aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/message.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/message.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/message.go')
-rw-r--r--whisper/message.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/whisper/message.go b/whisper/message.go
index 457cf6def..ad31aa592 100644
--- a/whisper/message.go
+++ b/whisper/message.go
@@ -75,8 +75,13 @@ func (self *Message) Wrap(pow time.Duration, options Options) (*Envelope, error)
return nil, err
}
}
+ // Convert the user topic into whisper ones
+ topics := make([]Topic, len(options.Topics))
+ for i, topic := range options.Topics {
+ topics[i] = NewTopic(topic)
+ }
// Wrap the processed message, seal it and return
- envelope := NewEnvelope(options.TTL, options.Topics, self)
+ envelope := NewEnvelope(options.TTL, topics, self)
envelope.Seal(pow)
return envelope, nil