xeth/whisper, ui/qt/qwhisper: fix API update breaks.

This commit is contained in:
Péter Szilágyi 2015-04-10 17:03:08 +03:00
parent 0e4f21fc37
commit f8a4cd7ec1
2 changed files with 4 additions and 4 deletions

@ -37,8 +37,8 @@ func (self *Whisper) Post(payload []string, to, from string, topics []string, pr
pk := crypto.ToECDSAPub(common.FromHex(from)) pk := crypto.ToECDSAPub(common.FromHex(from))
if key := self.Whisper.GetIdentity(pk); key != nil { if key := self.Whisper.GetIdentity(pk); key != nil {
msg := whisper.NewMessage(data) msg := whisper.NewMessage(data)
envelope, err := msg.Seal(time.Duration(priority*100000), whisper.Opts{ envelope, err := msg.Wrap(time.Duration(priority*100000), whisper.Options{
Ttl: time.Duration(ttl) * time.Second, TTL: time.Duration(ttl) * time.Second,
To: crypto.ToECDSAPub(common.FromHex(to)), To: crypto.ToECDSAPub(common.FromHex(to)),
From: key, From: key,
Topics: whisper.TopicsFromString(topics...), Topics: whisper.TopicsFromString(topics...),

@ -32,8 +32,8 @@ func (self *Whisper) Post(payload string, to, from string, topics []string, prio
pk := crypto.ToECDSAPub(common.FromHex(from)) pk := crypto.ToECDSAPub(common.FromHex(from))
if key := self.Whisper.GetIdentity(pk); key != nil || len(from) == 0 { if key := self.Whisper.GetIdentity(pk); key != nil || len(from) == 0 {
msg := whisper.NewMessage(common.FromHex(payload)) msg := whisper.NewMessage(common.FromHex(payload))
envelope, err := msg.Seal(time.Duration(priority*100000), whisper.Opts{ envelope, err := msg.Wrap(time.Duration(priority*100000), whisper.Options{
Ttl: time.Duration(ttl) * time.Second, TTL: time.Duration(ttl) * time.Second,
To: crypto.ToECDSAPub(common.FromHex(to)), To: crypto.ToECDSAPub(common.FromHex(to)),
From: key, From: key,
Topics: whisper.TopicsFromString(topics...), Topics: whisper.TopicsFromString(topics...),