aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/message.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-04-20 19:56:38 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-04-28 15:47:35 +0800
commit7948cc0029db76557d6540341bdfeb818ce32c65 (patch)
treed4547188632e4f53878cc0d06d1e4da840f35b07 /whisper/message.go
parent5aa523e32bedd923c4075a21daefd1b4a512277c (diff)
downloadgo-tangerine-7948cc0029db76557d6540341bdfeb818ce32c65.tar.gz
go-tangerine-7948cc0029db76557d6540341bdfeb818ce32c65.tar.zst
go-tangerine-7948cc0029db76557d6540341bdfeb818ce32c65.zip
rpc, whisper, xeth: fix RPC message retrieval data race
Diffstat (limited to 'whisper/message.go')
-rw-r--r--whisper/message.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/whisper/message.go b/whisper/message.go
index 07c673567..69d85b894 100644
--- a/whisper/message.go
+++ b/whisper/message.go
@@ -8,12 +8,13 @@ import (
"math/rand"
"time"
+ "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/logger/glog"
)
-// Message represents an end-user data packet to trasmit through the Whisper
+// Message represents an end-user data packet to transmit through the Whisper
// protocol. These are wrapped into Envelopes that need not be understood by
// intermediate nodes, just forwarded.
type Message struct {
@@ -22,7 +23,8 @@ type Message struct {
Payload []byte
Sent int64
- To *ecdsa.PublicKey
+ To *ecdsa.PublicKey // Message recipient (identity used to decode the message)
+ Hash common.Hash // Message envelope hash to act as a unique id in de-duplication
}
// Options specifies the exact way a message should be wrapped into an Envelope.