Skip to content

Commit

Permalink
BFT-465: Helpful comments in gossip code
Browse files Browse the repository at this point in the history
  • Loading branch information
aakoshh committed May 30, 2024
1 parent 7cc9dee commit 8709620
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion node/actors/network/src/gossip/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl Queue {
) -> ctx::OrCanceled<Call> {
let sub = &mut self.0.subscribe();
while ctx.is_active() {
// Wait for the lowest requested block to be available.
// Wait for the lowest requested block to be available on the remote peer.
// This scope is always cancelled, so we ignore the result.
let mut block_number = None;
let _: Result<(), _> = scope::run!(ctx, |ctx, s| async {
Expand Down
2 changes: 2 additions & 0 deletions node/actors/network/src/gossip/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ pub(crate) struct Network {
/// Output pipe of the network actor.
pub(crate) sender: channel::UnboundedSender<io::OutputMessage>,
/// Queue of block fetching requests.
///
/// These are blocks that this node wants to request from remote peers via RPC.
pub(crate) fetch_queue: fetch::Queue,
/// Last viewed QC.
pub(crate) last_viewed_qc: Option<attester::BatchQC>,
Expand Down
1 change: 1 addition & 0 deletions node/actors/network/src/gossip/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ impl Network {

// Perform get_block calls to peer.
s.spawn::<()>(async {
// Gossiped state of what range of blocks is available on the remote peer.
let state = &mut push_block_store_state_server.state.subscribe();
loop {
let call = get_block_client.reserve(ctx).await?;
Expand Down

0 comments on commit 8709620

Please sign in to comment.