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

[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: default avataryacovm <yacovm@il.ibm.com>
parent ede53fc6
......@@ -634,8 +634,8 @@ func (gc *gossipChannel) HandleMessage(msg proto.ReceivedMessage) {
return
}
// Would this block go into the message store if it was verified?
if !gc.blockMsgStore.CheckValid(msg.GetGossipMessage()) {
return
if !gc.blockMsgStore.CheckValid(gMsg) {
continue
}
if !gc.verifyBlock(gMsg.GossipMessage, msg.GetConnectionInfo().ID) {
return
......
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