mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 13:21:10 +00:00
refactor View to include finalized_number (#2128)
* refactor View to include finalized_number * guide: update the NetworkBridge on BlockFinalized * av-store: fix the tests * actually fix tests * grumbles * ignore macro doctest * use Hash::repeat_bytes more consistently * broadcast empty leaves updates as well * fix issuing view updates on empty leaves updates
This commit is contained in:
@@ -212,8 +212,8 @@ impl BitfieldDistribution {
|
||||
// defer the cleanup to the view change
|
||||
}
|
||||
}
|
||||
FromOverseer::Signal(OverseerSignal::BlockFinalized(hash)) => {
|
||||
tracing::trace!(target: LOG_TARGET, hash = %hash, "block finalized");
|
||||
FromOverseer::Signal(OverseerSignal::BlockFinalized(hash, number)) => {
|
||||
tracing::trace!(target: LOG_TARGET, hash = %hash, number = %number, "block finalized");
|
||||
}
|
||||
FromOverseer::Signal(OverseerSignal::Conclude) => {
|
||||
tracing::trace!(target: LOG_TARGET, "Conclude");
|
||||
@@ -770,13 +770,7 @@ mod test {
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
use assert_matches::assert_matches;
|
||||
use polkadot_node_network_protocol::ObservedRole;
|
||||
|
||||
macro_rules! view {
|
||||
( $( $hash:expr ),* $(,)? ) => [
|
||||
View(vec![ $( $hash.clone() ),* ])
|
||||
];
|
||||
}
|
||||
use polkadot_node_network_protocol::{view, ObservedRole};
|
||||
|
||||
macro_rules! launch {
|
||||
($fut:expr) => {
|
||||
@@ -833,7 +827,7 @@ mod test {
|
||||
let validator = SyncCryptoStore::sr25519_generate_new(&*keystore, ValidatorId::ID, None)
|
||||
.expect("generating sr25519 key not to fail");
|
||||
|
||||
state.per_relay_parent = view.0.iter().map(|relay_parent| {(
|
||||
state.per_relay_parent = view.heads.iter().map(|relay_parent| {(
|
||||
relay_parent.clone(),
|
||||
PerRelayParentData {
|
||||
signing_context: signing_context.clone(),
|
||||
|
||||
Reference in New Issue
Block a user