diff options
author | Felix Lange <fjl@users.noreply.github.com> | 2018-01-08 20:15:57 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-01-08 20:15:57 +0800 |
commit | 5c2f1e00148f16655d3fb63b93920b1108165c56 (patch) | |
tree | f3b453e05a8da60ceb006b5899554f8fbad86cf4 /core/vm/logger.go | |
parent | a139041d409d0ffaf81c7cf931c6b24299a05705 (diff) | |
download | go-tangerine-5c2f1e00148f16655d3fb63b93920b1108165c56.tar.gz go-tangerine-5c2f1e00148f16655d3fb63b93920b1108165c56.tar.zst go-tangerine-5c2f1e00148f16655d3fb63b93920b1108165c56.zip |
all: update generated code (#15808)
* core/types, core/vm, eth, tests: regenerate gencodec files
* Makefile: update devtools target
Install protoc-gen-go and print reminders about npm, solc and protoc.
Also switch to github.com/kevinburke/go-bindata because it's more
maintained.
* contracts/ens: update contracts and regenerate with solidity v0.4.19
The newer upstream version of the FIFSRegistrar contract doesn't set the
resolver anymore. The resolver is now deployed separately.
* contracts/release: regenerate with solidity v0.4.19
* contracts/chequebook: fix fallback and regenerate with solidity v0.4.19
The contract didn't have a fallback function, payments would be rejected
when compiled with newer solidity. References to 'mortal' and 'owned'
use the local file system so we can compile without network access.
* p2p/discv5: regenerate with recent stringer
* cmd/faucet: regenerate
* dashboard: regenerate
* eth/tracers: regenerate
* internal/jsre/deps: regenerate
* dashboard: avoid sed -i because it's not portable
* accounts/usbwallet/internal/trezor: fix go generate warnings
Diffstat (limited to 'core/vm/logger.go')
-rw-r--r-- | core/vm/logger.go | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/core/vm/logger.go b/core/vm/logger.go index 119181433..4c820d8b5 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -62,22 +62,30 @@ type StructLog struct { Stack []*big.Int `json:"stack"` Storage map[common.Hash]common.Hash `json:"-"` Depth int `json:"depth"` - Err error `json:"error"` + Err error `json:"-"` } // overrides for gencodec type structLogMarshaling struct { - Stack []*math.HexOrDecimal256 - Gas math.HexOrDecimal64 - GasCost math.HexOrDecimal64 - Memory hexutil.Bytes - OpName string `json:"opName"` + Stack []*math.HexOrDecimal256 + Gas math.HexOrDecimal64 + GasCost math.HexOrDecimal64 + Memory hexutil.Bytes + OpName string `json:"opName"` // adds call to OpName() in MarshalJSON + ErrorString string `json:"error"` // adds call to ErrorString() in MarshalJSON } func (s *StructLog) OpName() string { return s.Op.String() } +func (s *StructLog) ErrorString() string { + if s.Err != nil { + return s.Err.Error() + } + return "" +} + // Tracer is used to collect execution traces from an EVM transaction // execution. CaptureState is called for each step of the VM with the // current VM state. |