mirror of
https://github.com/alexgo-io/bitcoin-indexer.git
synced 2026-06-15 08:58:29 +08:00
feat: improve debug log
This commit is contained in:
@@ -938,14 +938,6 @@ pub fn retrieve_satoshi_point_using_lazy_storage(
|
||||
>,
|
||||
ctx: &Context,
|
||||
) -> Result<TraversalResult, String> {
|
||||
ctx.try_log(|logger| {
|
||||
slog::info!(
|
||||
logger,
|
||||
"Computing ordinal number for Satoshi point {}:0:0 (block #{})",
|
||||
transaction_identifier.hash,
|
||||
block_identifier.index
|
||||
)
|
||||
});
|
||||
let mut inscription_offset_intra_output = 0;
|
||||
let mut inscription_output_index: usize = 0;
|
||||
let mut ordinal_offset = 0;
|
||||
@@ -984,6 +976,17 @@ pub fn retrieve_satoshi_point_using_lazy_storage(
|
||||
inscription_offset_intra_output = inscription_offset_cross_outputs - min;
|
||||
}
|
||||
}
|
||||
ctx.try_log(|logger| {
|
||||
slog::info!(
|
||||
logger,
|
||||
"Computing ordinal number for Satoshi point {} ({}:0 -> {}:{}) (block #{})",
|
||||
transaction_identifier.hash,
|
||||
input_index,
|
||||
inscription_output_index,
|
||||
inscription_offset_intra_output,
|
||||
block_identifier.index
|
||||
)
|
||||
});
|
||||
|
||||
let mut tx_cursor: ([u8; 8], usize) = (txid, input_index);
|
||||
let mut hops: u32 = 0;
|
||||
|
||||
@@ -43,7 +43,9 @@ pub fn generate_test_bitcoin_block(
|
||||
parent_block_identifier,
|
||||
timestamp: 0,
|
||||
transactions,
|
||||
metadata: BitcoinBlockMetadata {},
|
||||
metadata: BitcoinBlockMetadata {
|
||||
network: chainhook_types::BitcoinNetwork::Regtest,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user