mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-01 02:11:01 +00:00
BlockId removal: refactor: Finalizer (#12528)
* BlockId removal: refactor: Finalizer It changes the arguments of methods of `Finalizer` trait from: block: `BlockId<Block>` to: hash: `&Block::Hash` This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292) * minor corrections * failing test corrected * minor rework
This commit is contained in:
committed by
GitHub
parent
7aadc2aa3c
commit
749bcd1949
@@ -1457,7 +1457,12 @@ fn grandpa_environment_respects_voting_rules() {
|
||||
);
|
||||
|
||||
// we finalize block 19 with block 21 being the best block
|
||||
peer.client().finalize_block(BlockId::Number(19), None, false).unwrap();
|
||||
let hashof19 = peer
|
||||
.client()
|
||||
.as_client()
|
||||
.expect_block_hash_from_id(&BlockId::Number(19))
|
||||
.unwrap();
|
||||
peer.client().finalize_block(&hashof19, None, false).unwrap();
|
||||
|
||||
// the 3/4 environment should propose block 21 for voting
|
||||
assert_eq!(
|
||||
@@ -1479,7 +1484,12 @@ fn grandpa_environment_respects_voting_rules() {
|
||||
);
|
||||
|
||||
// we finalize block 21 with block 21 being the best block
|
||||
peer.client().finalize_block(BlockId::Number(21), None, false).unwrap();
|
||||
let hashof21 = peer
|
||||
.client()
|
||||
.as_client()
|
||||
.expect_block_hash_from_id(&BlockId::Number(21))
|
||||
.unwrap();
|
||||
peer.client().finalize_block(&hashof21, None, false).unwrap();
|
||||
|
||||
// even though the default environment will always try to not vote on the
|
||||
// best block, there's a hard rule that we can't cast any votes lower than
|
||||
|
||||
Reference in New Issue
Block a user