Skip to content

Commit c89936c

Browse files
authored
Merge pull request #5897 from fdefelici/feat/log-tx-fee-for-included-and-skipped
Feat/log tx fee for included and skipped
2 parents 3123ccb + d718960 commit c89936c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
77

88
## [Unreleased]
99

10+
### Added"
11+
- Add fee information to transaction log ending with "success" or "skipped", while building a new block
12+
1013
### Changed
1114

1215
- When a miner times out waiting for signatures, it will re-propose the same block instead of building a new block ([#5877](https://github.com/stacks-network/stacks-core/pull/5877))

stackslib/src/chainstate/stacks/miner.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,10 +418,11 @@ pub enum TransactionEvent {
418418
impl TransactionResult {
419419
/// Logs a queryable message for the case where `txid` has succeeded.
420420
pub fn log_transaction_success(tx: &StacksTransaction) {
421-
info!("Tx successfully processed.";
421+
info!("Tx successfully processed";
422422
"event_name" => %"transaction_result",
423423
"tx_id" => %tx.txid(),
424424
"event_type" => %"success",
425+
"fee" => tx.get_tx_fee()
425426
);
426427
}
427428

@@ -445,6 +446,7 @@ impl TransactionResult {
445446
"tx_id" => %tx.txid(),
446447
"event_type" => "skip",
447448
"reason" => %err,
449+
"fee" => tx.get_tx_fee()
448450
);
449451
}
450452

0 commit comments

Comments
 (0)