Skip to content

Commit

Permalink
Blockchain's vmCtx should always be updated to point to the latest He…
Browse files Browse the repository at this point in the history
…ader
  • Loading branch information
m-Peter committed Sep 21, 2023
1 parent e300dd2 commit cd45777
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion emulator/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -791,10 +791,12 @@ func configureTransactionValidator(conf config, blocks *blocks) *access.Transact
}

func (b *Blockchain) newFVMContextFromHeader(header *flowgo.Header) fvm.Context {
return fvm.NewContextFromParent(
b.vmCtx = fvm.NewContextFromParent(
b.vmCtx,
fvm.WithBlockHeader(header),
)

return b.vmCtx
}

func (b *Blockchain) CurrentScript() (string, string) {
Expand Down

0 comments on commit cd45777

Please sign in to comment.