diff options
author | obscuren <geffobscura@gmail.com> | 2015-02-03 23:16:05 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-02-03 23:16:05 +0800 |
commit | 7bd2fbe2b1445c26190008d21ad52dc5c364765c (patch) | |
tree | 88553917d6be4a51f4a9dd87f35ce31782319ee1 /xeth | |
parent | 623469cb6c6cdb6ff84dc2cb7d4409e9d7cf3f65 (diff) | |
download | go-tangerine-7bd2fbe2b1445c26190008d21ad52dc5c364765c.tar.gz go-tangerine-7bd2fbe2b1445c26190008d21ad52dc5c364765c.tar.zst go-tangerine-7bd2fbe2b1445c26190008d21ad52dc5c364765c.zip |
Fixed whisper "to" filtering. Closes #283
Diffstat (limited to 'xeth')
-rw-r--r-- | xeth/whisper.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xeth/whisper.go b/xeth/whisper.go index d537f8c54..42d7c44bc 100644 --- a/xeth/whisper.go +++ b/xeth/whisper.go @@ -2,6 +2,7 @@ package xeth import ( "errors" + "fmt" "time" "github.com/ethereum/go-ethereum/crypto" @@ -31,6 +32,7 @@ func (self *Whisper) Post(payload string, to, from string, topics []string, prio pk := crypto.ToECDSAPub(fromHex(from)) if key := self.Whisper.GetIdentity(pk); key != nil || len(from) == 0 { + fmt.Println("POST:", to) msg := whisper.NewMessage(fromHex(payload)) envelope, err := msg.Seal(time.Duration(priority*100000), whisper.Opts{ Ttl: time.Duration(ttl) * time.Second, @@ -101,7 +103,7 @@ type WhisperMessage struct { ref *whisper.Message Payload string `json:"payload"` From string `json:"from"` - Sent uint64 `json:"time"` + Sent int64 `json:"time"` } func NewWhisperMessage(msg *whisper.Message) WhisperMessage { |