@@ -213,7 +213,8 @@ fn insert_tx_graph_doesnt_count_coinbase_as_spent() {
213213 } ;
214214
215215 let mut graph = TxGraph :: < ( ) > :: default ( ) ;
216- let _ = graph. insert_tx ( tx) ;
216+ let changeset = graph. insert_tx ( tx) ;
217+ assert ! ( !changeset. is_empty( ) ) ;
217218 assert ! ( graph. outspends( OutPoint :: null( ) ) . is_empty( ) ) ;
218219 assert ! ( graph. tx_spends( Txid :: all_zeros( ) ) . next( ) . is_none( ) ) ;
219220}
@@ -289,7 +290,7 @@ fn insert_tx_displaces_txouts() {
289290 } ] ,
290291 } ;
291292
292- let _ = tx_graph. insert_txout (
293+ let changeset = tx_graph. insert_txout (
293294 OutPoint {
294295 txid : tx. txid ( ) ,
295296 vout : 0 ,
@@ -300,6 +301,8 @@ fn insert_tx_displaces_txouts() {
300301 } ,
301302 ) ;
302303
304+ assert ! ( !changeset. is_empty( ) ) ;
305+
303306 let _ = tx_graph. insert_txout (
304307 OutPoint {
305308 txid : tx. txid ( ) ,
@@ -653,7 +656,8 @@ fn test_walk_ancestors() {
653656 ] ) ;
654657
655658 [ & tx_a0, & tx_b1] . iter ( ) . for_each ( |& tx| {
656- let _ = graph. insert_anchor ( tx. txid ( ) , tip. block_id ( ) ) ;
659+ let changeset = graph. insert_anchor ( tx. txid ( ) , tip. block_id ( ) ) ;
660+ assert ! ( !changeset. is_empty( ) ) ;
657661 } ) ;
658662
659663 let ancestors = [
@@ -1027,10 +1031,12 @@ fn test_changeset_last_seen_append() {
10271031 last_seen : original_ls. map ( |ls| ( txid, ls) ) . into_iter ( ) . collect ( ) ,
10281032 ..Default :: default ( )
10291033 } ;
1034+ assert ! ( !original. is_empty( ) || original_ls. is_none( ) ) ;
10301035 let update = ChangeSet :: < ( ) > {
10311036 last_seen : update_ls. map ( |ls| ( txid, ls) ) . into_iter ( ) . collect ( ) ,
10321037 ..Default :: default ( )
10331038 } ;
1039+ assert ! ( !update. is_empty( ) || update_ls. is_none( ) ) ;
10341040
10351041 original. append ( update) ;
10361042 assert_eq ! (
0 commit comments