mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 08:07:58 +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
@@ -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