Commit ede53fc6 authored by yacovm's avatar yacovm Committed by Yacov Manevich
Browse files

[FAB-14687] Only add to puller if needed

The gossip channel's method AddToMsgStore adds a block message
to both the block store and to the block puller.

However, it can be that the message isn't added to the block store
due to it being too old.

In such a case we must not add it to the block puller, because it is evicted
by the invalidation trigger of the block store which is programmed to
remove it from the block puller.

Change-Id: I64e7f4e64a337df5593a58a5d52a821b376b2bfb
Signed-off-by: default avataryacovm <>
parent 42420364
......@@ -500,8 +500,10 @@ func (gc *gossipChannel) EligibleForChannel(member discovery.NetworkMember) bool
// AddToMsgStore adds a given GossipMessage to the message store
func (gc *gossipChannel) AddToMsgStore(msg *proto.SignedGossipMessage) {
if msg.IsDataMsg() {
added := gc.blockMsgStore.Add(msg)
if added {
if msg.IsStateInfoMsg() {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment