rpc-v2: Limit transactionBroadcast calls to 16 (#3772)

This PR limits the number of active calls to the transactionBroadcast
APIs to 16.

cc @paritytech/subxt-team 

Closes: https://github.com/paritytech/polkadot-sdk/issues/3081

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: James Wilson <james@jsdw.me>
This commit is contained in:
Alexandru Vasile
2024-04-19 07:34:26 +03:00
committed by GitHub
parent 88a2f36023
commit 98a364fe6e
6 changed files with 133 additions and 21 deletions
+3
View File
@@ -644,10 +644,13 @@ where
(chain, state, child_state)
};
const MAX_TRANSACTION_PER_CONNECTION: usize = 16;
let transaction_broadcast_rpc_v2 = sc_rpc_spec_v2::transaction::TransactionBroadcast::new(
client.clone(),
transaction_pool.clone(),
task_executor.clone(),
MAX_TRANSACTION_PER_CONNECTION,
)
.into_rpc();