mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
BABE's revert procedure (#11022)
* First rough draft for BABE revert * Proper babe revert test * Cleanup * Test trivial cleanup * Fix to make clippy happy * Check polkadot companion * Check cumulus companion * Remove babe's blocks weight on revert * Handle "empty" blockchain edge case * Run companions * Simplify the filter predicate * Saturating sub is not required * Run pipeline * Run pipeline again...
This commit is contained in:
@@ -168,7 +168,13 @@ pub fn run() -> Result<()> {
|
||||
let runner = cli.create_runner(cmd)?;
|
||||
runner.async_run(|config| {
|
||||
let PartialComponents { client, task_manager, backend, .. } = new_partial(&config)?;
|
||||
Ok((cmd.run(client, backend), task_manager))
|
||||
let revert_aux = Box::new(|client, backend, blocks| {
|
||||
sc_consensus_babe::revert(client, backend, blocks)?;
|
||||
// TODO: grandpa revert
|
||||
Ok(())
|
||||
});
|
||||
|
||||
Ok((cmd.run(client, backend, Some(revert_aux)), task_manager))
|
||||
})
|
||||
},
|
||||
#[cfg(feature = "try-runtime")]
|
||||
|
||||
Reference in New Issue
Block a user