From 9a53390f49b9667db162bf2ef487d0af64b3363d Mon Sep 17 00:00:00 2001 From: Péter Szilágyi Date: Mon, 13 Apr 2015 12:16:51 +0300 Subject: whisper: clean up and integrate topics --- whisper/envelope.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'whisper/envelope.go') diff --git a/whisper/envelope.go b/whisper/envelope.go index c51c6e600..93e3ea1a3 100644 --- a/whisper/envelope.go +++ b/whisper/envelope.go @@ -19,7 +19,7 @@ import ( type Envelope struct { Expiry uint32 // Whisper protocol specifies int32, really should be int64 TTL uint32 // ^^^^^^ - Topics [][]byte + Topics []Topic Data []byte Nonce uint32 @@ -28,7 +28,7 @@ type Envelope struct { // NewEnvelope wraps a Whisper message with expiration and destination data // included into an envelope for network forwarding. -func NewEnvelope(ttl time.Duration, topics [][]byte, msg *Message) *Envelope { +func NewEnvelope(ttl time.Duration, topics []Topic, msg *Message) *Envelope { return &Envelope{ Expiry: uint32(time.Now().Add(ttl).Unix()), TTL: uint32(ttl.Seconds()), -- cgit