Skip to content

Commit 44d41b2

Browse files
committed
chore: update reputation service
1 parent 8449caf commit 44d41b2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

crates/account-abstraction-core/core/src/mempool.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub trait Mempool {
103103
&mut self,
104104
operation: &WrappedUserOperation,
105105
) -> Result<Option<OrderedPoolOperation>, anyhow::Error>;
106-
fn get_top_operations(&self, n: usize) -> impl Iterator<Item = Arc<WrappedUserOperation>>;
106+
fn get_top_operations(&self, n: usize) -> impl Iterator<Item = WrappedUserOperation>;
107107
fn remove_operation(
108108
&mut self,
109109
operation_hash: &UserOpHash,
@@ -132,7 +132,7 @@ impl Mempool for MempoolImpl {
132132
Ok(ordered_operation_result)
133133
}
134134

135-
fn get_top_operations(&self, n: usize) -> impl Iterator<Item = Arc<WrappedUserOperation>> {
135+
fn get_top_operations(&self, n: usize) -> impl Iterator<Item = WrappedUserOperation> {
136136
// TODO: There is a case where we skip operations that are not the lowest nonce for an account.
137137
// But we still have not given the N number of operations, meaning we don't return those operations.
138138

@@ -148,7 +148,7 @@ impl Mempool for MempoolImpl {
148148
Some(lowest)
149149
if lowest.0.pool_operation.hash == op_by_fee.0.pool_operation.hash =>
150150
{
151-
Some(Arc::new(op_by_fee.0.pool_operation.clone()))
151+
Some(op_by_fee.0.pool_operation.clone())
152152
}
153153
Some(_) => None,
154154
None => {

crates/account-abstraction-core/core/src/reputation_service.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub struct ReputationServiceImpl {
2323
}
2424

2525
impl ReputationServiceImpl {
26-
pub fn new(mempool: Arc<RwLock<mempool::MempoolImpl>>) -> Self {
26+
pub async fn new(mempool: Arc<RwLock<mempool::MempoolImpl>>) -> Self {
2727
Self { mempool }
2828
}
2929
}

0 commit comments

Comments
 (0)