mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 05:21:08 +00:00
Add grandpa telemetry (+ other minor improvements) (#1997)
* Support skipping the interactive purge prompt Skip it via `cargo run -- purge-chain -y`. * Fix typos * Add Grandpa telemetry * Address comments * Revert unnecessary version bump * Version bump to make CI run * Remove unnecessary cast * Do not bump version
This commit is contained in:
committed by
Bastian Köcher
parent
35a67b31e5
commit
c52c528ee8
@@ -14,6 +14,7 @@ consensus_common = { package = "substrate-consensus-common", path = "../../core/
|
||||
primitives = { package = "substrate-primitives", path = "../../core/primitives" }
|
||||
inherents = { package = "substrate-inherents", path = "../inherents" }
|
||||
transaction_pool = { package = "substrate-transaction-pool", path = "../../core/transaction-pool" }
|
||||
substrate-telemetry = { path = "../telemetry" }
|
||||
|
||||
[dev-dependencies]
|
||||
test-client = { package = "substrate-test-client", path = "../../core/test-client" }
|
||||
|
||||
@@ -37,6 +37,7 @@ use runtime_primitives::generic::BlockId;
|
||||
use runtime_primitives::ApplyError;
|
||||
use transaction_pool::txpool::{self, Pool as TransactionPool};
|
||||
use inherents::InherentData;
|
||||
use substrate_telemetry::{telemetry, CONSENSUS_INFO};
|
||||
|
||||
/// Build new blocks.
|
||||
pub trait BlockBuilder<Block: BlockT> {
|
||||
@@ -252,6 +253,10 @@ impl<Block, C, A> Proposer<Block, C, A> where
|
||||
.collect::<Vec<_>>()
|
||||
.join(", ")
|
||||
);
|
||||
telemetry!(CONSENSUS_INFO; "prepared_block_for_proposing";
|
||||
"number" => ?block.header().number(),
|
||||
"hash" => ?<<C as AuthoringApi>::Block as BlockT>::Hash::from(block.header().hash()),
|
||||
);
|
||||
|
||||
let substrate_block = Decode::decode(&mut block.encode().as_slice())
|
||||
.expect("blocks are defined to serialize to substrate blocks correctly; qed");
|
||||
|
||||
Reference in New Issue
Block a user