mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 18:41:05 +00:00
Availability store subsystem (#1404)
* Initial commit * WIP * Make atomic transactions * Remove pruning code * Fix build and add a Nop to bridge * Fixes from review * Move config struct around for clarity * Rename constructor and warn on missing docs * Fix a test and rename a message * Fix some more reviews * Obviously failed to rebase cleanly
This commit is contained in:
@@ -179,6 +179,9 @@ impl BitfieldDistribution {
|
||||
// defer the cleanup to the view change
|
||||
}
|
||||
}
|
||||
FromOverseer::Signal(OverseerSignal::BlockFinalized(hash)) => {
|
||||
trace!(target: "bitd", "Block finalized {:?}", hash);
|
||||
}
|
||||
FromOverseer::Signal(OverseerSignal::Conclude) => {
|
||||
trace!(target: "bitd", "Conclude");
|
||||
return Ok(());
|
||||
|
||||
@@ -213,6 +213,7 @@ enum Action {
|
||||
PeerMessages(PeerId, Vec<WireMessage>),
|
||||
|
||||
Abort,
|
||||
Nop,
|
||||
}
|
||||
|
||||
fn action_from_overseer_message(
|
||||
@@ -229,6 +230,8 @@ fn action_from_overseer_message(
|
||||
NetworkBridgeMessage::SendMessage(peers, protocol, message)
|
||||
=> Action::SendMessage(peers, protocol, message),
|
||||
},
|
||||
Ok(FromOverseer::Signal(OverseerSignal::BlockFinalized(_)))
|
||||
=> Action::Nop,
|
||||
Err(e) => {
|
||||
log::warn!(target: TARGET, "Shutting down Network Bridge due to error {:?}", e);
|
||||
Action::Abort
|
||||
@@ -502,6 +505,7 @@ async fn run_network<N: Network>(
|
||||
},
|
||||
|
||||
Action::Abort => return Ok(()),
|
||||
Action::Nop => (),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,6 +128,7 @@ async fn handle_signal(
|
||||
|
||||
Ok(false)
|
||||
}
|
||||
OverseerSignal::BlockFinalized(_) => Ok(false),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -864,6 +864,9 @@ async fn run(
|
||||
.or_insert(ActiveHeadData::new(validators, session_index));
|
||||
}
|
||||
}
|
||||
FromOverseer::Signal(OverseerSignal::BlockFinalized(_block_hash)) => {
|
||||
// do nothing
|
||||
}
|
||||
FromOverseer::Signal(OverseerSignal::Conclude) => break,
|
||||
FromOverseer::Communication { msg } => match msg {
|
||||
StatementDistributionMessage::Share(relay_parent, statement) =>
|
||||
|
||||
Reference in New Issue
Block a user