Skip to content

Commit

Permalink
chore: log full tx object in assert (paradigmxyz#5797)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Dec 16, 2023
1 parent 3e500ef commit bfe12ce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/transaction-pool/src/pool/blob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl<T: PoolTransaction> BlobTransactions<T> {
pub(crate) fn add_transaction(&mut self, tx: Arc<ValidPoolTransaction<T>>) {
assert!(tx.is_eip4844(), "transaction is not a blob tx");
let id = *tx.id();
assert!(!self.contains(&id), "transaction already included {:?}", self.contains(&id));
assert!(!self.contains(&id), "transaction already included {:?}", self.get(&id).unwrap());
let submission_id = self.next_id();

// keep track of size
Expand Down
2 changes: 1 addition & 1 deletion crates/transaction-pool/src/pool/parked.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl<T: ParkedOrd> ParkedPool<T> {
assert!(
!self.contains(&id),
"transaction already included {:?}",
self.get(&id).unwrap().transaction.hash()
self.get(&id).unwrap().transaction.transaction
);
let submission_id = self.next_id();

Expand Down
7 changes: 4 additions & 3 deletions crates/transaction-pool/src/pool/pending.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ impl<T: TransactionOrdering> PendingPool<T> {
assert!(
!self.contains(tx.id()),
"transaction already included {:?}",
self.get(tx.id()).unwrap().transaction.hash()
self.get(tx.id()).unwrap().transaction
);

// keep track of size
Expand Down Expand Up @@ -507,8 +507,9 @@ impl<T: TransactionOrdering> PendingPool<T> {
self.highest_nonces.len() <= self.all.len(),
"independent_descendants.len() > all.len()"
);
assert!(
self.highest_nonces.len() == self.independent_transactions.len(),
assert_eq!(
self.highest_nonces.len(),
self.independent_transactions.len(),
"independent.len() = independent_descendants.len()"
);
}
Expand Down

0 comments on commit bfe12ce

Please sign in to comment.