diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-04-21 16:43:11 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-04-28 15:49:04 +0800 |
commit | 7f48eb8737878e352a65475382532db26f9fbc52 (patch) | |
tree | 7db869690505978a4f111b996e7357572f64211c /whisper/envelope.go | |
parent | 19bc4624eaefc2c8201260e7afa1a5893159bffc (diff) | |
download | dexon-7f48eb8737878e352a65475382532db26f9fbc52.tar dexon-7f48eb8737878e352a65475382532db26f9fbc52.tar.gz dexon-7f48eb8737878e352a65475382532db26f9fbc52.tar.bz2 dexon-7f48eb8737878e352a65475382532db26f9fbc52.tar.lz dexon-7f48eb8737878e352a65475382532db26f9fbc52.tar.xz 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.go | 3 |
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:] |