From 95e93876e884f778e53dcccaea513c0447526a92 Mon Sep 17 00:00:00 2001 From: Jude Nelson Date: Fri, 28 Jul 2023 23:37:18 -0400 Subject: [PATCH] fix: bug in test -- stackerdb-aware nodes fall back to HandshakeAccept of the remote peer has a different view of the reward cycle consensus hash --- src/net/chat.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/net/chat.rs b/src/net/chat.rs index a9c385542..8c96664f0 100644 --- a/src/net/chat.rs +++ b/src/net/chat.rs @@ -3187,15 +3187,16 @@ mod test { assert_eq!(data.handshake.data_url, "http://peer2.com".into()); assert_eq!(data.heartbeat_interval, conn_opts.heartbeat); - // remote peer always replies with its supported smart contracts - assert_eq!( - db_data.smart_contracts, - vec![ContractId::parse("SP000000000000000000002Q6VF78.sbtc").unwrap()] - ); - if peer_1_rc_consensus_hash == peer_2_rc_consensus_hash { assert_eq!(db_data.rc_consensus_hash, chain_view_1.rc_consensus_hash); + // remote peer always replies with its supported smart contracts + assert_eq!( + db_data.smart_contracts, + vec![ContractId::parse("SP000000000000000000002Q6VF78.sbtc") + .unwrap()] + ); + // peers learn each others' smart contract DBs eprintln!( "{:?}, {:?}",