whisper, xeth/whisper: surface TTL and hash to the API

This commit is contained in:
Péter Szilágyi
2015-04-21 11:43:11 +03:00
parent 19bc4624ea
commit 7f48eb8737
5 changed files with 25 additions and 6 deletions

View File

@ -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:]