aboutsummaryrefslogtreecommitdiffstats
path: root/xeth/whisper.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-10 20:20:06 +0800
committerobscuren <geffobscura@gmail.com>2015-02-10 20:20:06 +0800
commitddccea75e8f4931689fdf6b57ec7159b65c0d3c5 (patch)
tree6d59f03673d85c83d1e1f14bc45f58c1eccba862 /xeth/whisper.go
parent58ba290a9f22d954fcc9a8544b992989121db3df (diff)
downloaddexon-ddccea75e8f4931689fdf6b57ec7159b65c0d3c5.tar
dexon-ddccea75e8f4931689fdf6b57ec7159b65c0d3c5.tar.gz
dexon-ddccea75e8f4931689fdf6b57ec7159b65c0d3c5.tar.bz2
dexon-ddccea75e8f4931689fdf6b57ec7159b65c0d3c5.tar.lz
dexon-ddccea75e8f4931689fdf6b57ec7159b65c0d3c5.tar.xz
dexon-ddccea75e8f4931689fdf6b57ec7159b65c0d3c5.tar.zst
dexon-ddccea75e8f4931689fdf6b57ec7159b65c0d3c5.zip
Fixed "to" field
Diffstat (limited to 'xeth/whisper.go')
-rw-r--r--xeth/whisper.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/xeth/whisper.go b/xeth/whisper.go
index 8e3bcefd0..d9c7e1614 100644
--- a/xeth/whisper.go
+++ b/xeth/whisper.go
@@ -99,8 +99,9 @@ type Options struct {
type WhisperMessage struct {
ref *whisper.Message
Payload string `json:"payload"`
+ To string `json:"to"`
From string `json:"from"`
- Sent int64 `json:"time"`
+ Sent int64 `json:"sent"`
}
func NewWhisperMessage(msg *whisper.Message) WhisperMessage {
@@ -108,6 +109,7 @@ func NewWhisperMessage(msg *whisper.Message) WhisperMessage {
ref: msg,
Payload: toHex(msg.Payload),
From: toHex(crypto.FromECDSAPub(msg.Recover())),
+ To: toHex(crypto.FromECDSAPub(msg.To)),
Sent: msg.Sent,
}
}