File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
zcash_client_backend/src/data_api Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -497,16 +497,16 @@ impl WalletWrite for MemoryWalletDb {
497
497
498
498
// Add the Sapling commitments to the sapling tree.
499
499
let block_commitments = block. into_commitments ( ) ;
500
- if let Ok ( Some ( pos ) ) = self . sapling_tree . max_leaf_position ( 0 ) {
500
+ if let Some ( value ) = from_state . final_sapling_tree ( ) . value ( ) {
501
501
self . sapling_tree
502
- . batch_insert ( pos , block_commitments. sapling . into_iter ( ) ) ;
502
+ . batch_insert ( value . position ( ) , block_commitments. sapling . into_iter ( ) ) ;
503
503
}
504
504
505
505
#[ cfg( feature = "orchard" ) ]
506
506
// Add the Orchard commitments to the orchard tree.
507
- if let Ok ( Some ( pos ) ) = self . orchard_tree . max_leaf_position ( 0 ) {
507
+ if let Some ( value ) = from_state . final_orchard_tree ( ) . value ( ) {
508
508
self . orchard_tree
509
- . batch_insert ( pos , block_commitments. orchard . into_iter ( ) ) ;
509
+ . batch_insert ( value . position ( ) , block_commitments. orchard . into_iter ( ) ) ;
510
510
}
511
511
}
512
512
You can’t perform that action at this time.
0 commit comments