Skip to content

Commit

Permalink
Update Blockchain.GetSourceFile() to use the Blockchain.NewScriptEnvi…
Browse files Browse the repository at this point in the history
…ronment() method
  • Loading branch information
m-Peter committed Sep 21, 2023
1 parent a349e2b commit e300dd2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions emulator/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1666,12 +1666,8 @@ func (b *Blockchain) GetSourceFile(location common.Location) string {
if !isAddressLocation {
return location.ID()
}
view := b.pendingBlock.ledgerState.NewChild()

env := environment.NewScriptEnvironmentFromStorageSnapshot(
b.vmCtx.EnvironmentParams,
view)

env := b.NewScriptEnvironment()
r := b.vmCtx.Borrow(env)
defer b.vmCtx.Return(r)

Expand Down

0 comments on commit e300dd2

Please sign in to comment.