@@ -56,7 +56,7 @@ impl TxOutTemplate {
56
56
pub struct TxTemplateEnv < ' a , A > {
57
57
pub tx_graph : TxGraph < A > ,
58
58
pub indexer : SpkTxOutIndex < u32 > ,
59
- pub txid_to_name : HashMap < & ' a str , Txid > ,
59
+ pub tx_name_to_txid : HashMap < & ' a str , Txid > ,
60
60
pub canonicalization_params : CanonicalizationParams ,
61
61
}
62
62
@@ -77,7 +77,7 @@ pub fn init_graph<'a, A: Anchor + Clone + 'a>(
77
77
. script_pubkey ( ) ,
78
78
) ;
79
79
} ) ;
80
- let mut txid_to_name = HashMap :: < & ' a str , Txid > :: new ( ) ;
80
+ let mut tx_name_to_txid = HashMap :: < & ' a str , Txid > :: new ( ) ;
81
81
82
82
let mut canonicalization_params = CanonicalizationParams :: default ( ) ;
83
83
for ( bogus_txin_vout, tx_tmp) in tx_templates. into_iter ( ) . enumerate ( ) {
@@ -108,7 +108,7 @@ pub fn init_graph<'a, A: Anchor + Clone + 'a>(
108
108
witness : Witness :: new ( ) ,
109
109
} ,
110
110
TxInTemplate :: PrevTx ( prev_name, prev_vout) => {
111
- let prev_txid = txid_to_name . get ( prev_name) . expect (
111
+ let prev_txid = tx_name_to_txid . get ( prev_name) . expect (
112
112
"txin template must spend from tx of template that comes before" ,
113
113
) ;
114
114
TxIn {
@@ -140,7 +140,7 @@ pub fn init_graph<'a, A: Anchor + Clone + 'a>(
140
140
if tx_tmp. assume_canonical {
141
141
canonicalization_params. assume_canonical . push ( txid) ;
142
142
}
143
- txid_to_name . insert ( tx_tmp. tx_name , txid) ;
143
+ tx_name_to_txid . insert ( tx_tmp. tx_name , txid) ;
144
144
indexer. scan ( & tx) ;
145
145
let _ = tx_graph. insert_tx ( tx. clone ( ) ) ;
146
146
for anchor in tx_tmp. anchors . iter ( ) {
@@ -153,7 +153,7 @@ pub fn init_graph<'a, A: Anchor + Clone + 'a>(
153
153
TxTemplateEnv {
154
154
tx_graph,
155
155
indexer,
156
- txid_to_name ,
156
+ tx_name_to_txid ,
157
157
canonicalization_params,
158
158
}
159
159
}
0 commit comments