aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/envelope.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-04-21 16:43:11 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-04-28 15:49:04 +0800
commit7f48eb8737878e352a65475382532db26f9fbc52 (patch)
tree7db869690505978a4f111b996e7357572f64211c /whisper/envelope.go
parent19bc4624eaefc2c8201260e7afa1a5893159bffc (diff)
downloaddexon-7f48eb8737878e352a65475382532db26f9fbc52.tar.gz
dexon-7f48eb8737878e352a65475382532db26f9fbc52.tar.zst
dexon-7f48eb8737878e352a65475382532db26f9fbc52.zip
whisper, xeth/whisper: surface TTL and hash to the API
Diffstat (limited to 'whisper/envelope.go')
-rw-r--r--whisper/envelope.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/whisper/envelope.go b/whisper/envelope.go
index c1d84df78..a4e2fa031 100644
--- a/whisper/envelope.go
+++ b/whisper/envelope.go
@@ -72,7 +72,8 @@ func (self *Envelope) Open(key *ecdsa.PrivateKey) (msg *Message, err error) {
message := &Message{
Flags: data[0],
- Sent: int64(self.Expiry - self.TTL),
+ Sent: time.Unix(int64(self.Expiry-self.TTL), 0),
+ TTL: time.Duration(self.TTL) * time.Second,
Hash: self.Hash(),
}
data = data[1:]