aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gen_stlog.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-08-25 16:00:51 +0800
committerGitHub <noreply@github.com>2017-08-25 16:00:51 +0800
commit27a5622e995d762683dd1a79423d83fcf3e62ccf (patch)
tree49e6fc917ada2c4a5c3be6b96c7f73581d218c69 /tests/gen_stlog.go
parent8596fc59740e3563be5095b0d8c64411331605f0 (diff)
parentb872961ec82ec88a7ac6ef331cfb3eb685ce2c00 (diff)
downloaddexon-27a5622e995d762683dd1a79423d83fcf3e62ccf.tar
dexon-27a5622e995d762683dd1a79423d83fcf3e62ccf.tar.gz
dexon-27a5622e995d762683dd1a79423d83fcf3e62ccf.tar.bz2
dexon-27a5622e995d762683dd1a79423d83fcf3e62ccf.tar.lz
dexon-27a5622e995d762683dd1a79423d83fcf3e62ccf.tar.xz
dexon-27a5622e995d762683dd1a79423d83fcf3e62ccf.tar.zst
dexon-27a5622e995d762683dd1a79423d83fcf3e62ccf.zip
Merge pull request #15028 from karalabe/metropolis-iceage
consensus, core, tests: implement Metropolis EIP 649
Diffstat (limited to 'tests/gen_stlog.go')
-rw-r--r--tests/gen_stlog.go61
1 files changed, 0 insertions, 61 deletions
diff --git a/tests/gen_stlog.go b/tests/gen_stlog.go
deleted file mode 100644
index 4f7ebc966..000000000
--- a/tests/gen_stlog.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Code generated by github.com/fjl/gencodec. DO NOT EDIT.
-
-package tests
-
-import (
- "encoding/json"
-
- "github.com/ethereum/go-ethereum/common"
- "github.com/ethereum/go-ethereum/common/hexutil"
-)
-
-var _ = (*stLogMarshaling)(nil)
-
-func (s stLog) MarshalJSON() ([]byte, error) {
- type stLog struct {
- Address common.UnprefixedAddress `json:"address"`
- Data hexutil.Bytes `json:"data"`
- Topics []common.UnprefixedHash `json:"topics"`
- Bloom string `json:"bloom"`
- }
- var enc stLog
- enc.Address = common.UnprefixedAddress(s.Address)
- enc.Data = s.Data
- if s.Topics != nil {
- enc.Topics = make([]common.UnprefixedHash, len(s.Topics))
- for k, v := range s.Topics {
- enc.Topics[k] = common.UnprefixedHash(v)
- }
- }
- enc.Bloom = s.Bloom
- return json.Marshal(&enc)
-}
-
-func (s *stLog) UnmarshalJSON(input []byte) error {
- type stLog struct {
- Address *common.UnprefixedAddress `json:"address"`
- Data hexutil.Bytes `json:"data"`
- Topics []common.UnprefixedHash `json:"topics"`
- Bloom *string `json:"bloom"`
- }
- var dec stLog
- if err := json.Unmarshal(input, &dec); err != nil {
- return err
- }
- if dec.Address != nil {
- s.Address = common.Address(*dec.Address)
- }
- if dec.Data != nil {
- s.Data = dec.Data
- }
- if dec.Topics != nil {
- s.Topics = make([]common.Hash, len(dec.Topics))
- for k, v := range dec.Topics {
- s.Topics[k] = common.Hash(v)
- }
- }
- if dec.Bloom != nil {
- s.Bloom = *dec.Bloom
- }
- return nil
-}