mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 18:41:03 +00:00
av-store: clean up StoreAvailableData message (#3984)
* av-store: clean up StoreAvailableData message * fmt * use named fields
This commit is contained in:
@@ -248,13 +248,12 @@ async fn participate(
|
||||
// we dispatch a request to store the available data for the candidate. we
|
||||
// want to maximize data availability for other potential checkers involved
|
||||
// in the dispute
|
||||
ctx.send_message(AvailabilityStoreMessage::StoreAvailableData(
|
||||
ctx.send_message(AvailabilityStoreMessage::StoreAvailableData {
|
||||
candidate_hash,
|
||||
None,
|
||||
n_validators,
|
||||
available_data.clone(),
|
||||
store_available_data_tx,
|
||||
))
|
||||
available_data: available_data.clone(),
|
||||
tx: store_available_data_tx,
|
||||
})
|
||||
.await;
|
||||
|
||||
match store_available_data_rx.await? {
|
||||
|
||||
@@ -150,13 +150,7 @@ async fn fetch_validation_code(virtual_overseer: &mut VirtualOverseer) {
|
||||
async fn store_available_data(virtual_overseer: &mut VirtualOverseer, success: bool) {
|
||||
assert_matches!(
|
||||
virtual_overseer.recv().await,
|
||||
AllMessages::AvailabilityStore(AvailabilityStoreMessage::StoreAvailableData(
|
||||
_,
|
||||
_,
|
||||
_,
|
||||
_,
|
||||
tx,
|
||||
)) => {
|
||||
AllMessages::AvailabilityStore(AvailabilityStoreMessage::StoreAvailableData { tx, .. }) => {
|
||||
if success {
|
||||
tx.send(Ok(())).unwrap();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user