Fixed whisper "to" filtering. Closes #283
This commit is contained in:
@ -11,11 +11,11 @@ type Message struct {
|
||||
Flags byte
|
||||
Signature []byte
|
||||
Payload []byte
|
||||
Sent uint64
|
||||
Sent int64
|
||||
}
|
||||
|
||||
func NewMessage(payload []byte) *Message {
|
||||
return &Message{Flags: 0, Payload: payload}
|
||||
return &Message{Flags: 0, Payload: payload, Sent: time.Now().Unix()}
|
||||
}
|
||||
|
||||
func (self *Message) hash() []byte {
|
||||
|
@ -269,7 +269,7 @@ func (self *Whisper) Protocol() p2p.Protocol {
|
||||
|
||||
func createFilter(message *Message, topics [][]byte, key *ecdsa.PrivateKey) filter.Filter {
|
||||
return filter.Generic{
|
||||
Str1: string(crypto.FromECDSA(key)), Str2: string(crypto.FromECDSAPub(message.Recover())),
|
||||
Str1: string(crypto.FromECDSAPub(&key.PublicKey)), Str2: string(crypto.FromECDSAPub(message.Recover())),
|
||||
Data: bytesToMap(topics),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user