Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions consensus/src/marshal/coding/marshaled.rs
Original file line number Diff line number Diff line change
Expand Up @@ -799,12 +799,25 @@ where
};
build_timer.observe(&runtime_context);

let round = consensus_context.round;
let erasure_timer = erasure_encode_duration.timer(&runtime_context);
let coded_block = CodedBlock::<B, C, H>::new(built_block, coding_config, &strategy);
let handle = runtime_context
.child("erasure_encode")
.with_attribute("round", round)
.shared(true)
.spawn(move |_| async move {
CodedBlock::<B, C, H>::new(built_block, coding_config, &strategy)
});
let coded_block = select! {
_ = tx.closed() => {
debug!(reason = "consensus dropped receiver", "skipping proposal");
return;
},
result = handle => result.expect("strategy task failed"),
};
erasure_timer.observe(&runtime_context);

let commitment = coded_block.commitment();
let round = consensus_context.round;
if !marshal.proposed(round, coded_block).await {
debug!(?round, ?commitment, "marshal rejected proposed block");
return;
Expand Down
Loading
Loading