diff options
author | Felix Lange <fjl@users.noreply.github.com> | 2018-01-08 21:13:22 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-01-08 21:13:22 +0800 |
commit | 9d06026c1991fdd8f034ce194fa20a0740c21810 (patch) | |
tree | 8625b7c087dfcd8cf8f087113c7242cf0d7639cd /whisper/whisperv6/gen_message_json.go | |
parent | 5c2f1e00148f16655d3fb63b93920b1108165c56 (diff) | |
download | go-tangerine-9d06026c1991fdd8f034ce194fa20a0740c21810.tar go-tangerine-9d06026c1991fdd8f034ce194fa20a0740c21810.tar.gz go-tangerine-9d06026c1991fdd8f034ce194fa20a0740c21810.tar.bz2 go-tangerine-9d06026c1991fdd8f034ce194fa20a0740c21810.tar.lz go-tangerine-9d06026c1991fdd8f034ce194fa20a0740c21810.tar.xz go-tangerine-9d06026c1991fdd8f034ce194fa20a0740c21810.tar.zst go-tangerine-9d06026c1991fdd8f034ce194fa20a0740c21810.zip |
all: regenerate codecs with gencodec commit 90983d99de (#15830)
Fixes #15777 because null is now allowed for hexutil.Bytes.
Diffstat (limited to 'whisper/whisperv6/gen_message_json.go')
-rw-r--r-- | whisper/whisperv6/gen_message_json.go | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/whisper/whisperv6/gen_message_json.go b/whisper/whisperv6/gen_message_json.go index 27b46752b..e193ba3e2 100644 --- a/whisper/whisperv6/gen_message_json.go +++ b/whisper/whisperv6/gen_message_json.go @@ -37,22 +37,22 @@ func (m Message) MarshalJSON() ([]byte, error) { func (m *Message) UnmarshalJSON(input []byte) error { type Message struct { - Sig hexutil.Bytes `json:"sig,omitempty"` - TTL *uint32 `json:"ttl"` - Timestamp *uint32 `json:"timestamp"` - Topic *TopicType `json:"topic"` - Payload hexutil.Bytes `json:"payload"` - Padding hexutil.Bytes `json:"padding"` - PoW *float64 `json:"pow"` - Hash hexutil.Bytes `json:"hash"` - Dst hexutil.Bytes `json:"recipientPublicKey,omitempty"` + Sig *hexutil.Bytes `json:"sig,omitempty"` + TTL *uint32 `json:"ttl"` + Timestamp *uint32 `json:"timestamp"` + Topic *TopicType `json:"topic"` + Payload *hexutil.Bytes `json:"payload"` + Padding *hexutil.Bytes `json:"padding"` + PoW *float64 `json:"pow"` + Hash *hexutil.Bytes `json:"hash"` + Dst *hexutil.Bytes `json:"recipientPublicKey,omitempty"` } var dec Message if err := json.Unmarshal(input, &dec); err != nil { return err } if dec.Sig != nil { - m.Sig = dec.Sig + m.Sig = *dec.Sig } if dec.TTL != nil { m.TTL = *dec.TTL @@ -64,19 +64,19 @@ func (m *Message) UnmarshalJSON(input []byte) error { m.Topic = *dec.Topic } if dec.Payload != nil { - m.Payload = dec.Payload + m.Payload = *dec.Payload } if dec.Padding != nil { - m.Padding = dec.Padding + m.Padding = *dec.Padding } if dec.PoW != nil { m.PoW = *dec.PoW } if dec.Hash != nil { - m.Hash = dec.Hash + m.Hash = *dec.Hash } if dec.Dst != nil { - m.Dst = dec.Dst + m.Dst = *dec.Dst } return nil } |