mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
feat: add ParityTraceBuilder::callers (#3099)
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
use crate::tracing::{types::CallTraceNode, TracingInspectorConfig};
|
||||
use reth_primitives::Address;
|
||||
use reth_rpc_types::{trace::parity::*, TransactionInfo};
|
||||
use revm::primitives::ExecutionResult;
|
||||
use std::collections::HashSet;
|
||||
@ -18,6 +19,11 @@ impl ParityTraceBuilder {
|
||||
Self { nodes, _config }
|
||||
}
|
||||
|
||||
/// Returns a list of all addresses that appeared as callers.
|
||||
pub fn callers(&self) -> HashSet<Address> {
|
||||
self.nodes.iter().map(|node| node.trace.caller).collect()
|
||||
}
|
||||
|
||||
/// Returns the trace addresses of all transactions in the set
|
||||
fn trace_addresses(&self) -> Vec<Vec<usize>> {
|
||||
let mut all_addresses = Vec::with_capacity(self.nodes.len());
|
||||
|
||||
Reference in New Issue
Block a user