Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.

Commit 9273c95

Browse files
committed
add is empty
1 parent 75f0fb3 commit 9273c95

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

crates/op-rbuilder/src/bundles.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use jsonrpsee::{
88
use op_alloy_consensus::OpTxEnvelope;
99
use std::{collections::HashMap, fmt::Debug, sync::Arc, time::Instant};
1010
use tips_core::AcceptedBundle;
11-
use tracing::{debug, info, warn};
11+
use tracing::{debug, warn};
1212
use uuid::Uuid;
1313

1414
use crate::metrics::OpRBuilderMetrics;
@@ -51,6 +51,8 @@ impl BackrunBundleStore {
5151
}
5252

5353
pub fn insert(&self, bundle: AcceptedBundle) -> Result<(), String> {
54+
warn!("Inserting backrun bundle for tx:");
55+
5456
if bundle.txs.len() < 2 {
5557
return Err("Bundle must have at least 2 transactions (target + backrun)".to_string());
5658
}
@@ -83,8 +85,10 @@ impl BackrunBundleStore {
8385
entry.insert(backrun_sender, stored_bundle).is_some()
8486
}; // entry lock released here
8587

88+
warn!("Replaced: {}", replaced);
89+
8690
if replaced {
87-
info!(
91+
warn!(
8892
target: "backrun_bundles",
8993
target_tx = ?target_tx_hash,
9094
sender = ?backrun_sender,
@@ -125,6 +129,10 @@ impl BackrunBundleStore {
125129
pub fn len(&self) -> usize {
126130
self.data.by_target_tx.len()
127131
}
132+
133+
pub fn is_empty(&self) -> bool {
134+
self.data.by_target_tx.is_empty()
135+
}
128136
}
129137

130138
impl Default for BackrunBundleStore {

0 commit comments

Comments
 (0)