File tree Expand file tree Collapse file tree 4 files changed +10
-17
lines changed Expand file tree Collapse file tree 4 files changed +10
-17
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ impl ScanTxOutSetUnspent {
95
95
txid,
96
96
vout : self . vout ,
97
97
script_pubkey,
98
- desc : Some ( self . desc ) ,
98
+ desc : Some ( self . descriptor ) ,
99
99
amount,
100
100
coinbase : None ,
101
101
height : self . height ,
Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ impl ScanTxOutSetStart {
242
242
pub fn into_model ( self ) -> Result < model:: ScanTxOutSetStart , ScanTxOutSetError > {
243
243
use ScanTxOutSetError as E ;
244
244
245
- let bestblock = self . bestblock . parse :: < BlockHash > ( ) . map_err ( E :: BestBlockHash ) ?;
245
+ let bestblock = self . best_block . parse :: < BlockHash > ( ) . map_err ( E :: BestBlockHash ) ?;
246
246
247
247
let unspents =
248
248
self . unspents . into_iter ( ) . map ( |u| u. into_model ( ) ) . collect :: < Result < Vec < _ > , _ > > ( ) ?;
@@ -272,7 +272,7 @@ impl ScanTxOutSetUnspent {
272
272
txid,
273
273
vout : self . vout ,
274
274
script_pubkey,
275
- desc : Some ( self . desc ) ,
275
+ desc : Some ( self . descriptor ) ,
276
276
amount,
277
277
coinbase : None ,
278
278
height : self . height ,
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ impl ScanTxOutSetStart {
67
67
pub fn into_model ( self ) -> Result < model:: ScanTxOutSetStart , ScanTxOutSetError > {
68
68
use ScanTxOutSetError as E ;
69
69
70
- let bestblock = self . bestblock . parse :: < BlockHash > ( ) . map_err ( E :: BestBlockHash ) ?;
70
+ let bestblock = self . best_block . parse :: < BlockHash > ( ) . map_err ( E :: BestBlockHash ) ?;
71
71
72
72
let unspents =
73
73
self . unspents . into_iter ( ) . map ( |u| u. into_model ( ) ) . collect :: < Result < Vec < _ > , _ > > ( ) ?;
@@ -97,7 +97,7 @@ impl ScanTxOutSetUnspent {
97
97
txid,
98
98
vout : self . vout ,
99
99
script_pubkey,
100
- desc : Some ( self . desc ) ,
100
+ desc : Some ( self . descriptor ) ,
101
101
amount,
102
102
coinbase : Some ( self . coinbase ) ,
103
103
height : self . height ,
Original file line number Diff line number Diff line change @@ -9,15 +9,10 @@ impl ScanTxOutSetStart {
9
9
pub fn into_model ( self ) -> Result < model:: ScanTxOutSetStart , ScanTxOutSetError > {
10
10
use ScanTxOutSetError as E ;
11
11
12
- let bestblock = self
13
- . bestblock
14
- . parse :: < BlockHash > ( ) . map_err ( E :: BestBlockHash ) ?;
12
+ let bestblock = self . best_block . parse :: < BlockHash > ( ) . map_err ( E :: BestBlockHash ) ?;
15
13
16
- let unspents = self
17
- . unspents
18
- . into_iter ( )
19
- . map ( |u| u. into_model ( ) )
20
- . collect :: < Result < Vec < _ > , _ > > ( ) ?;
14
+ let unspents =
15
+ self . unspents . into_iter ( ) . map ( |u| u. into_model ( ) ) . collect :: < Result < Vec < _ > , _ > > ( ) ?;
21
16
22
17
let total_amount = Amount :: from_btc ( self . total_amount ) . map_err ( E :: TotalAmount ) ?;
23
18
@@ -39,15 +34,13 @@ impl ScanTxOutSetUnspent {
39
34
let txid = self . txid . parse :: < Txid > ( ) . map_err ( E :: Txid ) ?;
40
35
let amount = Amount :: from_btc ( self . amount ) . map_err ( E :: Amount ) ?;
41
36
let script_pubkey = ScriptBuf :: from_hex ( & self . script_pubkey ) . map_err ( E :: ScriptPubKey ) ?;
42
- let blockhash = self
43
- . blockhash
44
- . parse :: < BlockHash > ( ) . map_err ( E :: BlockHash ) ?;
37
+ let blockhash = self . block_hash . parse :: < BlockHash > ( ) . map_err ( E :: BlockHash ) ?;
45
38
46
39
Ok ( model:: ScanTxOutSetUnspent {
47
40
txid,
48
41
vout : self . vout ,
49
42
script_pubkey,
50
- desc : Some ( self . desc ) ,
43
+ desc : Some ( self . descriptor ) ,
51
44
amount,
52
45
coinbase : Some ( self . coinbase ) ,
53
46
height : self . height ,
You can’t perform that action at this time.
0 commit comments