Skip to content

Commit

Permalink
fix: relayer balance (#1424)
Browse files Browse the repository at this point in the history
modify the relayer balance threshold for transaction propagation
  • Loading branch information
greged93 authored Oct 3, 2024
1 parent 95c481b commit 9f3e4be
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/pool/constants.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub(super) static ONE_TENTH_ETH: u64 = 10u64.pow(17);
3 changes: 2 additions & 1 deletion src/pool/mempool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use super::validate::KakarotTransactionValidator;
use crate::{
client::EthClient,
into_via_try_wrapper,
pool::constants::ONE_TENTH_ETH,
providers::eth_provider::{
constant::RPC_CONFIG, database::state::EthDatabase, starknet::relayer::LockedRelayer, BlockProvider,
},
Expand Down Expand Up @@ -154,7 +155,7 @@ impl<SP: starknet::providers::Provider + Send + Sync + Clone + 'static> AccountM
.unwrap_or_default();

// If the balance is lower than the threshold, continue
if balance < U256::from(u128::pow(10, 18)) {
if balance < U256::from(ONE_TENTH_ETH) {
accounts.remove(account_address);
continue;
}
Expand Down
1 change: 1 addition & 0 deletions src/pool/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
mod constants;
pub mod mempool;
pub mod validate;

0 comments on commit 9f3e4be

Please sign in to comment.