Skip to content

Commit

Permalink
Rename Blockchain's newFVMContextFromHeader() to setFVMContextFromHea…
Browse files Browse the repository at this point in the history
…der()
  • Loading branch information
m-Peter committed Sep 21, 2023
1 parent 5566481 commit e15a79d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions emulator/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ func configureTransactionValidator(conf config, blocks *blocks) *access.Transact
)
}

func (b *Blockchain) newFVMContextFromHeader(header *flowgo.Header) fvm.Context {
func (b *Blockchain) setFVMContextFromHeader(header *flowgo.Header) fvm.Context {
b.vmCtx = fvm.NewContextFromParent(
b.vmCtx,
fvm.WithBlockHeader(header),
Expand Down Expand Up @@ -1183,7 +1183,7 @@ func (b *Blockchain) executeBlock() ([]*types.TransactionResult, error) {
}

header := b.pendingBlock.Block().Header
blockContext := b.newFVMContextFromHeader(header)
blockContext := b.setFVMContextFromHeader(header)

// cannot execute a block that has already executed
if b.pendingBlock.ExecutionComplete() {
Expand Down Expand Up @@ -1211,7 +1211,7 @@ func (b *Blockchain) ExecuteNextTransaction() (*types.TransactionResult, error)
defer b.mu.Unlock()

header := b.pendingBlock.Block().Header
blockContext := b.newFVMContextFromHeader(header)
blockContext := b.setFVMContextFromHeader(header)
return b.executeNextTransaction(blockContext)
}

Expand Down

0 comments on commit e15a79d

Please sign in to comment.