-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/txindex #5661
base: develop
Are you sure you want to change the base?
Feat/txindex #5661
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -643,16 +643,8 @@ impl<'a> ChainstateTx<'a> { | |
events: &[StacksTransactionReceipt], | ||
) { | ||
if *TRANSACTION_LOG { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would just get rid of this variable entirely I think There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, but also add a clear message about this change to the changelog. |
||
let insert = | ||
"INSERT INTO transactions (txid, index_block_hash, tx_hex, result) VALUES (?, ?, ?, ?)"; | ||
for tx_event in events.iter() { | ||
let txid = tx_event.transaction.txid(); | ||
let tx_hex = tx_event.transaction.serialize_to_dbstring(); | ||
let result = tx_event.result.to_string(); | ||
let params = params![txid, block_id, tx_hex, result]; | ||
if let Err(e) = self.tx.tx().execute(insert, params) { | ||
warn!("Failed to log TX: {}", e); | ||
} | ||
NakamotoChainState::record_transaction(&self.tx, block_id, tx_event); | ||
} | ||
} | ||
for tx_event in events.iter() { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -620,6 +620,7 @@ impl RunLoop { | |
require_affirmed_anchor_blocks: moved_config | ||
.node | ||
.require_affirmed_anchor_blocks, | ||
txindex: false, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why doesn't this get the value from the config? |
||
}; | ||
ChainsCoordinator::run( | ||
coord_config, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is just replicating the old behavior, but while we're changing things, do we know if anyone who wants to use this feature would want to save any other metadata besides just the result, e.g. the events emitted or the cost?