diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-08 23:14:58 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-08 23:15:45 +0800 |
commit | 1c872ddf4b1db51847a5d9d020e13d432e847f52 (patch) | |
tree | 72ec461427269a25165b58043f328fd374e143ee /core/vm | |
parent | 6284604b52e075e454e61f2933cadaaf9ded364b (diff) | |
download | dexon-1c872ddf4b1db51847a5d9d020e13d432e847f52.tar dexon-1c872ddf4b1db51847a5d9d020e13d432e847f52.tar.gz dexon-1c872ddf4b1db51847a5d9d020e13d432e847f52.tar.bz2 dexon-1c872ddf4b1db51847a5d9d020e13d432e847f52.tar.lz dexon-1c872ddf4b1db51847a5d9d020e13d432e847f52.tar.xz dexon-1c872ddf4b1db51847a5d9d020e13d432e847f52.tar.zst dexon-1c872ddf4b1db51847a5d9d020e13d432e847f52.zip |
Changed how logs are being recorded
Logs are now recorded per transactions instead of tossing them out after
each transaction. This should also fix an issue with
`eth_getFilterLogs` (#629) Also now implemented are the `transactionHash,
blockHash, transactionIndex, logIndex` on logs. Closes #654.
Diffstat (limited to 'core/vm')
-rw-r--r-- | core/vm/environment.go | 2 | ||||
-rw-r--r-- | core/vm/vm.go | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/core/vm/environment.go b/core/vm/environment.go index 72e18c353..cc9570fc8 100644 --- a/core/vm/environment.go +++ b/core/vm/environment.go @@ -22,7 +22,7 @@ type Environment interface { Difficulty() *big.Int GasLimit() *big.Int Transfer(from, to Account, amount *big.Int) error - AddLog(state.Log) + AddLog(*state.Log) VmType() Type diff --git a/core/vm/vm.go b/core/vm/vm.go index 118f60076..927b67293 100644 --- a/core/vm/vm.go +++ b/core/vm/vm.go @@ -557,7 +557,8 @@ func (self *Vm) Run(context *Context, callData []byte) (ret []byte, err error) { } data := mem.Get(mStart.Int64(), mSize.Int64()) - log := &Log{context.Address(), topics, data, self.env.BlockNumber().Uint64()} + log := state.NewLog(context.Address(), topics, data, self.env.BlockNumber().Uint64()) + //log := &Log{context.Address(), topics, data, self.env.BlockNumber().Uint64()} self.env.AddLog(log) self.Printf(" => %v", log) |