File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
crates/bitcoind_rpc/examples Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -68,8 +68,10 @@ fn main() -> anyhow::Result<()> {
6868
6969 println ! ( "\n took: {}s" , start. elapsed( ) . as_secs( ) ) ;
7070 println ! ( "Local tip: {}" , chain. tip( ) . height( ) ) ;
71- let unspent: Vec < _ > = graph
72- . canonical_view ( & chain, chain. tip ( ) . block_id ( ) , Default :: default ( ) )
71+
72+ let canonical_view = graph. canonical_view ( & chain, chain. tip ( ) . block_id ( ) , Default :: default ( ) ) ;
73+
74+ let unspent: Vec < _ > = canonical_view
7375 . filter_unspent_outpoints ( graph. index . outpoints ( ) . clone ( ) )
7476 . collect ( ) ;
7577 if !unspent. is_empty ( ) {
@@ -80,14 +82,7 @@ fn main() -> anyhow::Result<()> {
8082 }
8183 }
8284
83- for canon_tx in graph
84- . canonical_view (
85- & chain,
86- chain. tip ( ) . block_id ( ) ,
87- bdk_chain:: CanonicalizationParams :: default ( ) ,
88- )
89- . txs ( )
90- {
85+ for canon_tx in canonical_view. txs ( ) {
9186 if !canon_tx. pos . is_confirmed ( ) {
9287 eprintln ! ( "ERROR: canonical tx should be confirmed {}" , canon_tx. txid) ;
9388 }
You can’t perform that action at this time.
0 commit comments