mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 13:27:57 +00:00
Add prometheus registry to transaction pool, with couple of initial metrics (#5657)
* make new contructor * add metrics to txpool * fix review * fix doc comment * change to counters * Update client/transaction-pool/src/metrics.rs Co-Authored-By: Max Inden <mail@max-inden.de> * Update client/transaction-pool/src/metrics.rs Co-Authored-By: Max Inden <mail@max-inden.de> * Update client/transaction-pool/src/metrics.rs Co-Authored-By: Max Inden <mail@max-inden.de> * Update client/transaction-pool/src/lib.rs Co-Authored-By: Max Inden <mail@max-inden.de> * Update client/transaction-pool/src/lib.rs Co-Authored-By: Max Inden <mail@max-inden.de> * use dedicated wrapper Co-authored-by: Max Inden <mail@max-inden.de>
This commit is contained in:
@@ -360,7 +360,11 @@ mod tests {
|
||||
// given
|
||||
let client = Arc::new(substrate_test_runtime_client::new());
|
||||
let txpool = Arc::new(
|
||||
BasicPool::new(Default::default(), Arc::new(FullChainApi::new(client.clone()))).0
|
||||
BasicPool::new(
|
||||
Default::default(),
|
||||
Arc::new(FullChainApi::new(client.clone())),
|
||||
None,
|
||||
).0
|
||||
);
|
||||
|
||||
futures::executor::block_on(
|
||||
@@ -408,7 +412,11 @@ mod tests {
|
||||
fn should_not_panic_when_deadline_is_reached() {
|
||||
let client = Arc::new(substrate_test_runtime_client::new());
|
||||
let txpool = Arc::new(
|
||||
BasicPool::new(Default::default(), Arc::new(FullChainApi::new(client.clone()))).0
|
||||
BasicPool::new(
|
||||
Default::default(),
|
||||
Arc::new(FullChainApi::new(client.clone())),
|
||||
None,
|
||||
).0
|
||||
);
|
||||
|
||||
let mut proposer_factory = ProposerFactory::new(client.clone(), txpool.clone());
|
||||
@@ -440,8 +448,13 @@ mod tests {
|
||||
.build_with_backend();
|
||||
let client = Arc::new(client);
|
||||
let txpool = Arc::new(
|
||||
BasicPool::new(Default::default(), Arc::new(FullChainApi::new(client.clone()))).0
|
||||
BasicPool::new(
|
||||
Default::default(),
|
||||
Arc::new(FullChainApi::new(client.clone())),
|
||||
None,
|
||||
).0
|
||||
);
|
||||
|
||||
let genesis_hash = client.info().best_hash;
|
||||
let block_id = BlockId::Hash(genesis_hash);
|
||||
|
||||
@@ -493,7 +506,11 @@ mod tests {
|
||||
// given
|
||||
let mut client = Arc::new(substrate_test_runtime_client::new());
|
||||
let txpool = Arc::new(
|
||||
BasicPool::new(Default::default(), Arc::new(FullChainApi::new(client.clone()))).0
|
||||
BasicPool::new(
|
||||
Default::default(),
|
||||
Arc::new(FullChainApi::new(client.clone())),
|
||||
None,
|
||||
).0
|
||||
);
|
||||
|
||||
futures::executor::block_on(
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
//! # use substrate_test_runtime_client::{self, runtime::{Extrinsic, Transfer}, AccountKeyring};
|
||||
//! # use sc_transaction_pool::{BasicPool, FullChainApi};
|
||||
//! # let client = Arc::new(substrate_test_runtime_client::new());
|
||||
//! # let txpool = Arc::new(BasicPool::new(Default::default(), Arc::new(FullChainApi::new(client.clone()))).0);
|
||||
//! # let txpool = Arc::new(BasicPool::new(Default::default(), Arc::new(FullChainApi::new(client.clone())), None).0);
|
||||
//! // The first step is to create a `ProposerFactory`.
|
||||
//! let mut proposer_factory = ProposerFactory::new(client.clone(), txpool.clone());
|
||||
//!
|
||||
|
||||
Reference in New Issue
Block a user