@@ -2,7 +2,7 @@ use bitcoin::hashes::sha256d::Hash as Sha256dHash;
22use bitcoin:: hex:: FromHex ;
33#[ cfg( not( feature = "liquid" ) ) ]
44use bitcoin:: merkle_tree:: MerkleBlock ;
5- use bitcoin:: { Amount , Witness } ;
5+ use bitcoin:: Amount ;
66use crypto:: digest:: Digest ;
77use crypto:: sha2:: Sha256 ;
88use hex;
@@ -625,7 +625,10 @@ impl Indexer {
625625
626626 for ( txo_index, txo) in tx. output . iter ( ) . enumerate ( ) {
627627 if is_spendable ( txo) {
628- let amount = ( txo. value as Amount ) . to_sat ( ) ;
628+ #[ cfg( not( feature = "liquid" ) ) ]
629+ let amount = txo. value . to_sat ( ) ;
630+ #[ cfg( feature = "liquid" ) ]
631+ let amount = txo. value . explicit ( ) . unwrap_or ( 0 ) ;
629632 #[ allow( deprecated) ]
630633 if txo. script_pubkey . is_p2tr ( )
631634 && amount >= self . iconfig . sp_min_dust . unwrap_or ( 1_000 ) as u64
@@ -666,9 +669,13 @@ impl Indexer {
666669
667670 let prev_txo = lookup_txo ( & self . store . txstore_db , & txin. previous_output ) ;
668671 if let Some ( prev_txo) = prev_txo {
672+ #[ cfg( not( feature = "liquid" ) ) ]
673+ let witness_vec = txin. witness . to_vec ( ) ;
674+ #[ cfg( feature = "liquid" ) ]
675+ let witness_vec = txin. witness . script_witness . clone ( ) ;
669676 match get_pubkey_from_input (
670677 & txin. script_sig . to_bytes ( ) ,
671- & ( txin . witness . clone ( ) as Witness ) . to_vec ( ) ,
678+ & witness_vec ,
672679 & prev_txo. script_pubkey . to_bytes ( ) ,
673680 ) {
674681 Ok ( Some ( pubkey) ) => pubkeys. push ( pubkey) ,
0 commit comments