File tree 1 file changed +9
-11
lines changed
1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -2404,12 +2404,12 @@ impl Index {
2404
2404
pub ( crate ) fn get_output_info ( & self , outpoint : OutPoint ) -> Result < Option < ( api:: Output , TxOut ) > > {
2405
2405
let sat_ranges = self . list ( outpoint) ?;
2406
2406
2407
- let indexed;
2408
2407
let confirmations;
2408
+ let indexed;
2409
2409
let spent;
2410
+ let txout;
2410
2411
2411
- // make confirmations 0 for these
2412
- let txout = if outpoint == OutPoint :: null ( ) || outpoint == unbound_outpoint ( ) {
2412
+ if outpoint == OutPoint :: null ( ) || outpoint == unbound_outpoint ( ) {
2413
2413
let mut value = 0 ;
2414
2414
2415
2415
if let Some ( ranges) = & sat_ranges {
@@ -2421,11 +2421,10 @@ impl Index {
2421
2421
indexed = true ;
2422
2422
confirmations = 0 ;
2423
2423
spent = true ;
2424
-
2425
- TxOut {
2424
+ txout = TxOut {
2426
2425
value : Amount :: from_sat ( value) ,
2427
2426
script_pubkey : ScriptBuf :: new ( ) ,
2428
- }
2427
+ } ;
2429
2428
} else {
2430
2429
indexed = self . contains_output ( & outpoint) ?;
2431
2430
@@ -2435,11 +2434,10 @@ impl Index {
2435
2434
{
2436
2435
spent = false ;
2437
2436
confirmations = result. confirmations ;
2438
-
2439
- TxOut {
2437
+ txout = TxOut {
2440
2438
value : result. value ,
2441
2439
script_pubkey : ScriptBuf :: from_bytes ( result. script_pub_key . hex ) ,
2442
- }
2440
+ } ;
2443
2441
} else {
2444
2442
spent = true ;
2445
2443
@@ -2451,10 +2449,10 @@ impl Index {
2451
2449
2452
2450
confirmations = result. confirmations . unwrap_or ( 0 ) ;
2453
2451
2454
- TxOut {
2452
+ txout = TxOut {
2455
2453
value : output. value ,
2456
2454
script_pubkey : ScriptBuf :: from_bytes ( output. script_pub_key . hex ) ,
2457
- }
2455
+ } ;
2458
2456
}
2459
2457
} ;
2460
2458
You can’t perform that action at this time.
0 commit comments