Skip to content

Commit

Permalink
fix: remove insert_transaction_receipt from mongo_fuzzer
Browse files Browse the repository at this point in the history
  • Loading branch information
eugypalu committed Oct 16, 2024
1 parent 3faf83c commit 60c54a6
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions src/test_utils/mongo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ use crate::providers::eth_provider::{
},
};
use alloy_primitives::{B256, U256};
use alloy_rpc_types::{Transaction, TransactionReceipt};
use alloy_serde::WithOtherFields;
use alloy_rpc_types::Transaction;
use arbitrary::Arbitrary;
use mongodb::{
bson::{self, doc, Document},
Expand Down Expand Up @@ -331,24 +330,6 @@ impl MongoFuzzer {
.expect("Failed to insert documents");
}
}

pub async fn insert_transaction_receipt(
&mut self,
receipt: WithOtherFields<TransactionReceipt>,
) -> Result<(), Box<dyn std::error::Error>> {
// Convert the receipt into a StoredTransactionReceipt
let stored_receipt = StoredTransactionReceipt { receipt };

// Add the receipt to the receipts and logs collections
self.receipts.push(stored_receipt.clone());
self.logs.append(&mut Vec::from(stored_receipt.clone()));

// Update the collections in the database
self.update_collection(CollectionDB::Receipts).await;
self.update_collection(CollectionDB::Logs).await;

Ok(())
}
}

#[cfg(test)]
Expand Down

0 comments on commit 60c54a6

Please sign in to comment.