mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-12 15:03:45 +00:00
add comments
This commit is contained in:
parent
788851b3e1
commit
057bbdac10
1 changed files with 5 additions and 1 deletions
|
|
@ -53,6 +53,10 @@ func (n *proofList) Delete(key []byte) error {
|
||||||
panic("not supported")
|
panic("not supported")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// StateLogger is used to collect state update traces from EVM transaction
|
||||||
|
// execution.
|
||||||
|
// Note that reference types are actual VM data structures; make copies
|
||||||
|
// if you need to retain them beyond the current call.
|
||||||
type StateLogger interface {
|
type StateLogger interface {
|
||||||
OnBalanceChange(addr common.Address, prev, new *big.Int)
|
OnBalanceChange(addr common.Address, prev, new *big.Int)
|
||||||
OnNonceChange(addr common.Address, prev, new uint64)
|
OnNonceChange(addr common.Address, prev, new uint64)
|
||||||
|
|
@ -171,7 +175,7 @@ func New(root common.Hash, db Database, snaps *snapshot.Tree) (*StateDB, error)
|
||||||
return sdb, nil
|
return sdb, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: move to New
|
// SetLogger sets the logger for account update hooks.
|
||||||
func (s *StateDB) SetLogger(l StateLogger) {
|
func (s *StateDB) SetLogger(l StateLogger) {
|
||||||
s.logger = l
|
s.logger = l
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue