Skip to content

Commit 6459600

Browse files
committed
chores
1 parent 122ff8b commit 6459600

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

api/src/common/send.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ impl ExecuteSignedTransaction {
231231
///
232232
/// This is useful if you want to send the transaction to a non-default network configuration (e.g, custom RPC URL, sandbox).
233233
/// Please note that if the transaction is not presigned, it will be signed with the network's nonce and block hash
234-
/// and sent depending on signer mode.
234+
/// and sent in sequential mode to avoid nonce conflicts
235235
///
236236
/// Returns a [`TransactionResult`] which is either:
237237
/// - [`TransactionResult::Pending`] if `wait_until` is `None` or `Included` (no execution data available yet)
@@ -258,7 +258,7 @@ impl ExecuteSignedTransaction {
258258

259259
// If the transaction is signed, send it to the network.
260260
// If the transaction is not signed, sign it and send
261-
// to the network depending on signer mode.
261+
// in sequential mode to avoid nonce conflicts
262262
match signed {
263263
Some(signed) => Self::send_impl(network, signed, self.wait_until).await,
264264
None => {
@@ -518,7 +518,7 @@ impl ExecuteMetaTransaction {
518518
///
519519
/// This is useful if you want to send the transaction to a non-default network configuration (e.g, custom RPC URL, sandbox).
520520
/// Please note that if the transaction is not presigned, it will be sign with the network's nonce and block hash
521-
/// and sent depending on signer mode.
521+
/// and sent in sequential mode to avoid nonce conflicts
522522
pub async fn send_to(
523523
mut self,
524524
network: &NetworkConfig,
@@ -544,7 +544,7 @@ impl ExecuteMetaTransaction {
544544

545545
// If the transaction is signed, send it to the relayer.
546546
// If the transaction is not signed, sign it and send
547-
// depending on signer mode.
547+
// in sequential mode to avoid nonce conflicts
548548
match signed {
549549
Some(signed) => Self::send_impl(network, signed).await,
550550
None => {

api/src/signer/sequential.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl Signer {
8383
///
8484
/// This method is used to sign and send a transaction to the network.
8585
/// Transactions of the same transaction group (network, account, public key)
86-
/// sent through this method will be sent sequentially
86+
/// sent through this method will be sequential
8787
#[instrument(skip(self, network, transaction, account_id))]
8888
pub async fn sign_and_send(
8989
&self,
@@ -127,7 +127,7 @@ impl Signer {
127127
///
128128
/// This method is used to sign and send a meta transaction to the relayer.
129129
/// Transactions of the same transaction group (network, account, public key)
130-
/// sent through this method will be sent sequentially
130+
/// sent through this method will be sequential
131131
#[instrument(skip(self, network, transaction, account_id))]
132132
pub async fn sign_and_send_meta(
133133
&self,
@@ -149,7 +149,7 @@ impl Signer {
149149

150150
#[allow(clippy::significant_drop_tightening)]
151151
#[instrument(skip(self, account_id, network))]
152-
pub(crate) async fn broadcast_tx(
152+
async fn broadcast_tx(
153153
&self,
154154
account_id: impl Into<AccountId>,
155155
public_key: PublicKey,
@@ -185,7 +185,7 @@ impl Signer {
185185

186186
#[allow(clippy::significant_drop_tightening)]
187187
#[instrument(skip(self, account_id, network))]
188-
pub(crate) async fn broadcast_meta_tx(
188+
async fn broadcast_meta_tx(
189189
&self,
190190
account_id: impl Into<AccountId>,
191191
public_key: PublicKey,

api/tests/sequential_tx.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ async fn multiple_sequential_tx_at_same_time_from_different_keys() -> TestResult
6363
let receiver: AccountId = "tmp_account".parse()?;
6464
let account: AccountId = DEFAULT_GENESIS_ACCOUNT.into();
6565
let pubkey_count = 9;
66-
let tx_count = 10_000;
66+
let tx_count = 1000;
6767
let first_pubkey = PublicKey::from_str(DEFAULT_GENESIS_ACCOUNT_PUBLIC_KEY)?;
6868

6969
let sandbox = near_sandbox::Sandbox::start_sandbox().await?;

0 commit comments

Comments
 (0)