Skip to content

Commit 0c762e8

Browse files
committed
[FAB-14688] Check inner, not outer block msg
The gossip code that handles pull block data updates has an optimization that first performs a simulation of adding an inner block message to the message store, and only if the simulation is successful - it then verifies the message. The problem is that the simulation is done against the outer message, and thus the optimization does not occur. This change set fixes this. Change-Id: I71c94e9b1cad2bfa6e9cfce700d8bd3209e9b5e7 Signed-off-by: yacovm <yacovm@il.ibm.com>
1 parent 731d7cd commit 0c762e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gossip/gossip/channel/channel.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -656,8 +656,8 @@ func (gc *gossipChannel) HandleMessage(msg protoext.ReceivedMessage) {
656656
return
657657
}
658658
// Would this block go into the message store if it was verified?
659-
if !gc.blockMsgStore.CheckValid(msg.GetGossipMessage()) {
660-
return
659+
if !gc.blockMsgStore.CheckValid(gMsg) {
660+
continue
661661
}
662662
if !gc.verifyBlock(gMsg.GossipMessage, msg.GetConnectionInfo().ID) {
663663
return

0 commit comments

Comments
 (0)