@@ -542,7 +542,7 @@ func TestChannelPeerNotInChannel(t *testing.T) {
542
542
543
543
// Ensure we don't respond to a StateInfoRequest in the wrong channel from a peer in the right org
544
544
req2 := gc .(* gossipChannel ).createStateInfoRequest ()
545
- req2 .GetStateInfoPullReq ().ChannelMAC = GenerateMAC (pkiIDInOrg1 , common .ChainID ("B" ))
545
+ req2 .GetStateInfoPullReq ().Channel_MAC = GenerateMAC (pkiIDInOrg1 , common .ChainID ("B" ))
546
546
invalidReceivedMsg2 := & receivedMsg {
547
547
msg : req2 ,
548
548
PKIID : pkiIDInOrg1 ,
@@ -897,7 +897,7 @@ func TestChannelStateInfoSnapshot(t *testing.T) {
897
897
898
898
// Ensure we ignore stateInfo snapshots with StateInfo messages with wrong MACs
899
899
sim := createStateInfoMsg (4 , pkiIDInOrg1 , channelA )
900
- sim .GetStateInfo ().ChannelMAC = append (sim .GetStateInfo ().ChannelMAC , 1 )
900
+ sim .GetStateInfo ().Channel_MAC = append (sim .GetStateInfo ().Channel_MAC , 1 )
901
901
sim = sim .NoopSign ()
902
902
gc .HandleMessage (& receivedMsg {PKIID : pkiIDInOrg1 , msg : stateInfoSnapshotForChannel (channelA , sim )})
903
903
assert .Empty (t , gc .GetPeers ())
@@ -918,7 +918,7 @@ func TestChannelStateInfoSnapshot(t *testing.T) {
918
918
Tag : proto .GossipMessage_CHAN_OR_ORG ,
919
919
Content : & proto.GossipMessage_StateInfoPullReq {
920
920
StateInfoPullReq : & proto.StateInfoPullRequest {
921
- ChannelMAC : append (GenerateMAC (pkiIDInOrg1 , channelA ), 1 ),
921
+ Channel_MAC : append (GenerateMAC (pkiIDInOrg1 , channelA ), 1 ),
922
922
},
923
923
},
924
924
}).NoopSign (),
@@ -941,7 +941,7 @@ func TestChannelStateInfoSnapshot(t *testing.T) {
941
941
Tag : proto .GossipMessage_CHAN_OR_ORG ,
942
942
Content : & proto.GossipMessage_StateInfoPullReq {
943
943
StateInfoPullReq : & proto.StateInfoPullRequest {
944
- ChannelMAC : GenerateMAC (pkiIDInOrg1 , channelA ),
944
+ Channel_MAC : GenerateMAC (pkiIDInOrg1 , channelA ),
945
945
},
946
946
},
947
947
}).NoopSign (),
@@ -1043,7 +1043,7 @@ func TestInterOrgExternalEndpointDisclosure(t *testing.T) {
1043
1043
Tag : proto .GossipMessage_CHAN_OR_ORG ,
1044
1044
Content : & proto.GossipMessage_StateInfoPullReq {
1045
1045
StateInfoPullReq : & proto.StateInfoPullRequest {
1046
- ChannelMAC : GenerateMAC (pkiID3 , channelA ),
1046
+ Channel_MAC : GenerateMAC (pkiID3 , channelA ),
1047
1047
},
1048
1048
},
1049
1049
}).NoopSign (),
@@ -1074,7 +1074,7 @@ func TestInterOrgExternalEndpointDisclosure(t *testing.T) {
1074
1074
Tag : proto .GossipMessage_CHAN_OR_ORG ,
1075
1075
Content : & proto.GossipMessage_StateInfoPullReq {
1076
1076
StateInfoPullReq : & proto.StateInfoPullRequest {
1077
- ChannelMAC : GenerateMAC (pkiID2 , channelA ),
1077
+ Channel_MAC : GenerateMAC (pkiID2 , channelA ),
1078
1078
},
1079
1079
},
1080
1080
}).NoopSign (),
@@ -1284,7 +1284,7 @@ func TestChannelGetPeers(t *testing.T) {
1284
1284
// and ensure that the StateInfo message doesn't count
1285
1285
gc = NewGossipChannel (pkiIDInOrg1 , orgInChannelA , cs , channelA , adapter , & joinChanMsg {})
1286
1286
msg := & receivedMsg {PKIID : pkiIDInOrg1 , msg : createStateInfoMsg (1 , pkiIDInOrg1 , channelA )}
1287
- msg .GetGossipMessage ().GetStateInfo ().ChannelMAC = GenerateMAC (pkiIDinOrg2 , channelA )
1287
+ msg .GetGossipMessage ().GetStateInfo ().Channel_MAC = GenerateMAC (pkiIDinOrg2 , channelA )
1288
1288
gc .HandleMessage (msg )
1289
1289
assert .Len (t , gc .GetPeers (), 0 )
1290
1290
}
@@ -1405,10 +1405,10 @@ func createStateInfoMsg(ledgerHeight int, pkiID common.PKIidType, channel common
1405
1405
Tag : proto .GossipMessage_CHAN_OR_ORG ,
1406
1406
Content : & proto.GossipMessage_StateInfo {
1407
1407
StateInfo : & proto.StateInfo {
1408
- ChannelMAC : GenerateMAC (pkiID , channel ),
1409
- Timestamp : & proto.PeerTime {IncNumber : uint64 (time .Now ().UnixNano ()), SeqNum : 1 },
1410
- Metadata : []byte (fmt .Sprintf ("%d" , ledgerHeight )),
1411
- PkiId : []byte (pkiID ),
1408
+ Channel_MAC : GenerateMAC (pkiID , channel ),
1409
+ Timestamp : & proto.PeerTime {IncNumber : uint64 (time .Now ().UnixNano ()), SeqNum : 1 },
1410
+ Metadata : []byte (fmt .Sprintf ("%d" , ledgerHeight )),
1411
+ PkiId : []byte (pkiID ),
1412
1412
},
1413
1413
},
1414
1414
}).NoopSign ()
0 commit comments