aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/whisperv5/gen_newmessage_json.go
diff options
context:
space:
mode:
Diffstat (limited to 'whisper/whisperv5/gen_newmessage_json.go')
-rw-r--r--whisper/whisperv5/gen_newmessage_json.go26
1 files changed, 13 insertions, 13 deletions
diff --git a/whisper/whisperv5/gen_newmessage_json.go b/whisper/whisperv5/gen_newmessage_json.go
index d0a47185e..97ffb64ad 100644
--- a/whisper/whisperv5/gen_newmessage_json.go
+++ b/whisper/whisperv5/gen_newmessage_json.go
@@ -39,16 +39,16 @@ func (n NewMessage) MarshalJSON() ([]byte, error) {
func (n *NewMessage) UnmarshalJSON(input []byte) error {
type NewMessage struct {
- SymKeyID *string `json:"symKeyID"`
- PublicKey hexutil.Bytes `json:"pubKey"`
- Sig *string `json:"sig"`
- TTL *uint32 `json:"ttl"`
- Topic *TopicType `json:"topic"`
- Payload hexutil.Bytes `json:"payload"`
- Padding hexutil.Bytes `json:"padding"`
- PowTime *uint32 `json:"powTime"`
- PowTarget *float64 `json:"powTarget"`
- TargetPeer *string `json:"targetPeer"`
+ SymKeyID *string `json:"symKeyID"`
+ PublicKey *hexutil.Bytes `json:"pubKey"`
+ Sig *string `json:"sig"`
+ TTL *uint32 `json:"ttl"`
+ Topic *TopicType `json:"topic"`
+ Payload *hexutil.Bytes `json:"payload"`
+ Padding *hexutil.Bytes `json:"padding"`
+ PowTime *uint32 `json:"powTime"`
+ PowTarget *float64 `json:"powTarget"`
+ TargetPeer *string `json:"targetPeer"`
}
var dec NewMessage
if err := json.Unmarshal(input, &dec); err != nil {
@@ -58,7 +58,7 @@ func (n *NewMessage) UnmarshalJSON(input []byte) error {
n.SymKeyID = *dec.SymKeyID
}
if dec.PublicKey != nil {
- n.PublicKey = dec.PublicKey
+ n.PublicKey = *dec.PublicKey
}
if dec.Sig != nil {
n.Sig = *dec.Sig
@@ -70,10 +70,10 @@ func (n *NewMessage) UnmarshalJSON(input []byte) error {
n.Topic = *dec.Topic
}
if dec.Payload != nil {
- n.Payload = dec.Payload
+ n.Payload = *dec.Payload
}
if dec.Padding != nil {
- n.Padding = dec.Padding
+ n.Padding = *dec.Padding
}
if dec.PowTime != nil {
n.PowTime = *dec.PowTime