Added missing whisper timestamp. Closes #284

This commit is contained in:
obscuren
2015-02-03 06:56:19 -08:00
parent 663d725026
commit 623469cb6c
3 changed files with 5 additions and 7 deletions

View File

@ -99,16 +99,16 @@ type Options struct {
type WhisperMessage struct {
ref *whisper.Message
Flags int32 `json:"flags"`
Payload string `json:"payload"`
From string `json:"from"`
Sent uint64 `json:"time"`
}
func NewWhisperMessage(msg *whisper.Message) WhisperMessage {
return WhisperMessage{
ref: msg,
Flags: int32(msg.Flags),
Payload: "0x" + ethutil.Bytes2Hex(msg.Payload),
From: "0x" + ethutil.Bytes2Hex(crypto.FromECDSAPub(msg.Recover())),
Sent: msg.Sent,
}
}