diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-01-12 00:20:31 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2016-01-12 00:21:39 +0800 |
commit | 752c75fb21ad151204f2aadeee1fff597e013aa2 (patch) | |
tree | f2d3d19ba6c7e112c4764f1167b2ce91e8e45f88 /core/vm/contract.go | |
parent | 1b8566a7b137d68c5c7c42d6300378d7ebf21c49 (diff) | |
download | go-tangerine-752c75fb21ad151204f2aadeee1fff597e013aa2.tar go-tangerine-752c75fb21ad151204f2aadeee1fff597e013aa2.tar.gz go-tangerine-752c75fb21ad151204f2aadeee1fff597e013aa2.tar.bz2 go-tangerine-752c75fb21ad151204f2aadeee1fff597e013aa2.tar.lz go-tangerine-752c75fb21ad151204f2aadeee1fff597e013aa2.tar.xz go-tangerine-752c75fb21ad151204f2aadeee1fff597e013aa2.tar.zst go-tangerine-752c75fb21ad151204f2aadeee1fff597e013aa2.zip |
core/vm: resolve circular dependency to debug vm storage
Diffstat (limited to 'core/vm/contract.go')
-rw-r--r-- | core/vm/contract.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/vm/contract.go b/core/vm/contract.go index 95417e747..5981dcca0 100644 --- a/core/vm/contract.go +++ b/core/vm/contract.go @@ -27,6 +27,7 @@ type ContractRef interface { ReturnGas(*big.Int, *big.Int) Address() common.Address SetCode([]byte) + EachStorage(cb func(key, value []byte)) } // Contract represents an ethereum contract in the state database. It contains @@ -124,3 +125,9 @@ func (self *Contract) SetCallCode(addr *common.Address, code []byte) { self.Code = code self.CodeAddr = addr } + +// EachStorage iterates the contract's storage and calls a method for every key +// value pair. +func (self *Contract) EachStorage(cb func(key, value []byte)) { + self.caller.EachStorage(cb) +} |