@@ -92,6 +92,7 @@ fn test_try_make_response() {
92
92
let rpc_test = TestRPC :: setup_nakamoto ( function_name ! ( ) , & test_observer) ;
93
93
94
94
let nakamoto_chain_tip_height = rpc_test. tip_height . clone ( ) ;
95
+ let canonical_tip = rpc_test. canonical_tip . clone ( ) ;
95
96
let consensus_hash = rpc_test. consensus_hash . clone ( ) ;
96
97
97
98
let mut requests = vec ! [ ] ;
@@ -146,6 +147,7 @@ fn test_try_make_response() {
146
147
let resp = response. decode_nakamoto_block ( ) . unwrap ( ) ;
147
148
148
149
assert_eq ! ( resp. header. consensus_hash, consensus_hash) ;
150
+ assert_eq ! ( resp. header. block_id( ) , canonical_tip) ;
149
151
150
152
// no block
151
153
let response = responses. remove ( 0 ) ;
@@ -158,12 +160,14 @@ fn test_try_make_response() {
158
160
let resp = response. decode_nakamoto_block ( ) . unwrap ( ) ;
159
161
160
162
assert_eq ! ( resp. header. consensus_hash, consensus_hash) ;
163
+ assert_eq ! ( resp. header. block_id( ) , canonical_tip) ;
161
164
162
165
// got the block from the tip (unconfirmed)
163
166
let response = responses. remove ( 0 ) ;
164
167
let resp = response. decode_nakamoto_block ( ) . unwrap ( ) ;
165
168
166
169
assert_eq ! ( resp. header. consensus_hash, consensus_hash) ;
170
+ assert_eq ! ( resp. header. block_id( ) , canonical_tip) ;
167
171
168
172
// no block for dummy tip
169
173
let response = responses. remove ( 0 ) ;
0 commit comments