Skip to content
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: make sure duplication check happens first in mempool #4627

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion applications/tari_base_node/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ async fn build_node_context(
app_config.base_node.bypass_range_proof_verification,
blockchain_db.clone(),
)),
Box::new(TxInputAndMaturityValidator::new(blockchain_db.clone())),
Box::new(TxConsensusValidator::new(blockchain_db.clone())),
Box::new(TxInputAndMaturityValidator::new(blockchain_db.clone())),
]);
let mempool = Mempool::new(
app_config.base_node.mempool.clone(),
Expand Down
5 changes: 4 additions & 1 deletion base_layer/core/src/mempool/mempool_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ impl MempoolStorage {
Ok(TxStorageResponse::NotStoredConsensus)
},
Err(ValidationError::DuplicateKernelError(msg)) => {
warn!(target: LOG_TARGET, "Validation failed due to duplicate kernel: {}", msg);
debug!(
target: LOG_TARGET,
"Validation failed due to already mined kernel: {}", msg
);
Ok(TxStorageResponse::NotStoredConsensus)
},
Err(e) => {
Expand Down
6 changes: 1 addition & 5 deletions base_layer/wallet_ffi/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ fn main() {
]),
..Default::default()
},
autogen_warning: Some(
"// This file was generated by cargo-bindgen. Please do not edit
manually."
.to_string(),
),
autogen_warning: Some("// This file was generated by cargo-bindgen. Please do not edit manually.".to_string()),
style: Style::Tag,
cpp_compat: true,
export: ExportConfig {
Expand Down