@@ -2,7 +2,8 @@ use chainhook_sdk::{
2
2
bitcoincore_rpc_json:: bitcoin:: { hashes:: hex:: FromHex , Address , Network , Script } ,
3
3
types:: {
4
4
BitcoinBlockData , BitcoinNetwork , BitcoinTransactionData , BlockIdentifier ,
5
- OrdinalInscriptionTransferData , OrdinalOperation , TransactionIdentifier , OrdinalInscriptionTransferDestination ,
5
+ OrdinalInscriptionTransferData , OrdinalInscriptionTransferDestination , OrdinalOperation ,
6
+ TransactionIdentifier ,
6
7
} ,
7
8
utils:: Context ,
8
9
} ;
@@ -84,14 +85,7 @@ pub fn augment_transaction_with_ordinals_transfers_data(
84
85
) ;
85
86
86
87
let entries =
87
- match find_inscriptions_at_wached_outpoint ( & outpoint_pre_transfer, & inscriptions_db_tx)
88
- {
89
- Ok ( entries) => entries,
90
- Err ( e) => {
91
- ctx. try_log ( |logger| warn ! ( logger, "unable query inscriptions: {e}" ) ) ;
92
- continue ;
93
- }
94
- } ;
88
+ find_inscriptions_at_wached_outpoint ( & outpoint_pre_transfer, & inscriptions_db_tx, ctx) ;
95
89
// For each satpoint inscribed retrieved, we need to compute the next
96
90
// outpoint to watch
97
91
for watched_satpoint in entries. into_iter ( ) {
@@ -124,10 +118,12 @@ pub fn augment_transaction_with_ordinals_transfers_data(
124
118
tx. metadata . outputs [ output_index] . get_script_pubkey_hex ( ) ;
125
119
let updated_address = match Script :: from_hex ( & script_pub_key_hex) {
126
120
Ok ( script) => match Address :: from_script ( & script, network. clone ( ) ) {
127
- Ok ( address) => OrdinalInscriptionTransferDestination :: Transferred ( address. to_string ( ) ) ,
121
+ Ok ( address) => OrdinalInscriptionTransferDestination :: Transferred (
122
+ address. to_string ( ) ,
123
+ ) ,
128
124
Err ( e) => {
129
125
ctx. try_log ( |logger| {
130
- warn ! (
126
+ info ! (
131
127
logger,
132
128
"unable to retrieve address from {script_pub_key_hex}: {}" ,
133
129
e. to_string( )
@@ -138,13 +134,15 @@ pub fn augment_transaction_with_ordinals_transfers_data(
138
134
} ,
139
135
Err ( e) => {
140
136
ctx. try_log ( |logger| {
141
- warn ! (
137
+ info ! (
142
138
logger,
143
139
"unable to retrieve address from {script_pub_key_hex}: {}" ,
144
140
e. to_string( )
145
141
)
146
142
} ) ;
147
- OrdinalInscriptionTransferDestination :: Burnt ( script_pub_key_hex. to_string ( ) )
143
+ OrdinalInscriptionTransferDestination :: Burnt (
144
+ script_pub_key_hex. to_string ( ) ,
145
+ )
148
146
}
149
147
} ;
150
148
@@ -181,7 +179,12 @@ pub fn augment_transaction_with_ordinals_transfers_data(
181
179
offset
182
180
)
183
181
} ) ;
184
- ( outpoint, total_offset, OrdinalInscriptionTransferDestination :: SpentInFees , None )
182
+ (
183
+ outpoint,
184
+ total_offset,
185
+ OrdinalInscriptionTransferDestination :: SpentInFees ,
186
+ None ,
187
+ )
185
188
}
186
189
} ;
187
190
0 commit comments