Ivan Tomilov ebd77aabe2 Merging bug/whisper-on-geth1.6.1 (#236) which acts like develop
* static: updates Whisper test (to work with Geth 1.6.1)
* jail: VM persistence implemented
* jail: sendMessage/showSuggestions minor fixes (to be squashed)
* node: CHT and boot nodes auto-load implemented
* Replaced CHT data file from farazdagi's to tiabc's
* Rewrote config_test.go using testify having reduced it twice in size
* Increased SyncTime and panic timeout in tests
* Fixed test - remove go default test to testify/suite (#207)
* Add flag setup for RPCEnabled and add comment (#225)
* jail: register method handlers before running initial js in jail (#226)
* Console Jail Mod #179 (#228)
* Added ./statusd-data into .gitignore
* Increased log level for the test node from INFO to ERROR
* Add call to loop.Run to evaluate all setTimeout/setIntervals methods. (#208)
* Rebase onto geth1.6.7 (#232)
* Got back sync duration from 60s to 30s, updated bindata.go
2017-08-04 23:14:17 +07:00

62 lines
1.5 KiB
Go

// 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
}