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:
Nikolay Volf
2020-04-17 12:02:45 +03:00
committed by GitHub
parent 7dcff4c1e2
commit fea626ca84
15 changed files with 157 additions and 26 deletions
@@ -415,7 +415,7 @@ fn finalization() {
let xt = uxt(Alice, 209);
let api = TestApi::with_alice_nonce(209);
api.push_block(1, vec![]);
let (pool, _background) = BasicPool::new(Default::default(), api.into());
let (pool, _background, _) = BasicPool::new_test(api.into());
let watcher = block_on(
pool.submit_and_watch(&BlockId::number(1), SOURCE, xt.clone())
).expect("1. Imported");
@@ -446,7 +446,7 @@ fn fork_aware_finalization() {
// starting block A1 (last finalized.)
api.push_block(1, vec![]);
let (pool, _background) = BasicPool::new(Default::default(), api.into());
let (pool, _background, _) = BasicPool::new_test(api.into());
let mut canon_watchers = vec![];
let from_alice = uxt(Alice, 1);
@@ -677,7 +677,7 @@ fn should_not_accept_old_signatures() {
let client = Arc::new(substrate_test_runtime_client::new());
let pool = Arc::new(
BasicPool::new(Default::default(), Arc::new(FullChainApi::new(client))).0
BasicPool::new_test(Arc::new(FullChainApi::new(client))).0
);
let transfer = Transfer {