bsc/whisper
Jeffrey Wilcke 5f0a4416db whisper: fixed broadcast race
Whisper's expire and broadcast loops happen in two separate go routines.
Whenever an envelope is being expired it's removed from the set of
envelopes and it looses all information about the envelope, including
the "known hash". After the envelope has been removed it can be
re-accepted by a broadcasting peer putting back the envelope in the set
of envelopes. Since the envelope broadcast loop is separate of the
expire loop expired messages may be broadcast to other peer, resulting
in messages **never** being dropped.

This PR includes an expire check before adding new messages to the set
of envelopes.
2015-11-25 12:10:47 +01:00
..
doc.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
envelope_test.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
envelope.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
filter_test.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
filter.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
main.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
message_test.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
message.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
peer_test.go whisper: fixed broadcast race 2015-11-25 12:10:47 +01:00
peer.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
topic_test.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
topic.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
whisper_test.go whisper: fixed broadcast race 2015-11-25 12:10:47 +01:00
whisper.go whisper: fixed broadcast race 2015-11-25 12:10:47 +01:00