Skip to content

Commit fb79712

Browse files
StephenButtolphceyonur
authored andcommitted
update statedb stuff
1 parent 7afb501 commit fb79712

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

core/state/statedb.libevm.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,8 @@ func transformStateKey(addr common.Address, key common.Hash, opts ...stateconf.S
7575
}
7676
return r.Get().TransformStateKey(addr, key)
7777
}
78+
79+
// GetTxHash returns the current tx hash on the StateDB set by SetTxContext.
80+
func (s *StateDB) GetTxHash() common.Hash {
81+
return s.thash
82+
}

core/vm/interface.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ type StateDB interface {
8080

8181
AddLog(*types.Log)
8282
AddPreimage(common.Hash, []byte)
83+
84+
GetTxHash() common.Hash
8385
}
8486

8587
// CallContext provides a basic interface for the EVM calling conventions. The EVM

0 commit comments

Comments
 (0)