aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/envelope.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-04-13 17:16:51 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-04-13 17:16:51 +0800
commit9a53390f49b9667db162bf2ef487d0af64b3363d (patch)
treeb71d2daee37a56a7872d5d3c1536ed83a39d7bc2 /whisper/envelope.go
parent7b501906db5b4bed0cf9972a1b103cc343d7f2d2 (diff)
downloadgo-tangerine-9a53390f49b9667db162bf2ef487d0af64b3363d.tar
go-tangerine-9a53390f49b9667db162bf2ef487d0af64b3363d.tar.gz
go-tangerine-9a53390f49b9667db162bf2ef487d0af64b3363d.tar.bz2
go-tangerine-9a53390f49b9667db162bf2ef487d0af64b3363d.tar.lz
go-tangerine-9a53390f49b9667db162bf2ef487d0af64b3363d.tar.xz
go-tangerine-9a53390f49b9667db162bf2ef487d0af64b3363d.tar.zst
go-tangerine-9a53390f49b9667db162bf2ef487d0af64b3363d.zip
whisper: clean up and integrate topics
Diffstat (limited to 'whisper/envelope.go')
-rw-r--r--whisper/envelope.go4
1 files changed, 2 insertions, 2 deletions
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()),