Skip to content

Commit 4b01600

Browse files
committed
Repair & Sign: async repair requests
1 parent fa06266 commit 4b01600

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/discof/repair/fd_repair_tile.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ struct fd_repair_tile_ctx {
130130

131131
fd_wksp_t * wksp;
132132

133+
fd_stem_context_t * stem;
134+
133135
uchar in_kind[ MAX_IN_LINKS ];
134136
fd_repair_in_ctx_t in_links[ MAX_IN_LINKS ];
135137

@@ -670,7 +672,7 @@ during_frag( fd_repair_tile_ctx_t * ctx,
670672
fd_memcpy( ctx->buffer, dcache_entry, dcache_entry_sz );
671673
}
672674

673-
static ulong
675+
static ulong FD_FN_UNUSED
674676
fd_repair_send_ping( fd_repair_tile_ctx_t * repair_tile_ctx,
675677
fd_repair_t * glob,
676678
fd_pinged_elem_t * val,
@@ -697,7 +699,7 @@ fd_repair_send_ping( fd_repair_tile_ctx_t * repair_tile_ctx,
697699
return (ulong)((uchar*)ctx.data - buf);
698700
}
699701

700-
static void
702+
static void FD_FN_UNUSED
701703
fd_repair_recv_pong(fd_repair_t * glob, fd_gossip_ping_t const * pong, fd_gossip_peer_addr_t const * from) {
702704
fd_pinged_elem_t * val = fd_pinged_table_query(glob->pinged, from, NULL);
703705
if( val == NULL || !fd_pubkey_eq( &val->id, &pong->from ) )
@@ -747,6 +749,8 @@ after_frag( fd_repair_tile_ctx_t * ctx,
747749

748750
if( FD_UNLIKELY( ctx->skip_frag ) ) return;
749751

752+
ctx->stem = stem;
753+
750754
uint in_kind = ctx->in_kind[ in_idx ];
751755
// FD_LOG_INFO(( "in_idx: %lu, in_kind: %u", in_idx, in_kind ));
752756
if( FD_UNLIKELY( in_kind==IN_KIND_CONTACT ) ) {
@@ -768,7 +772,7 @@ after_frag( fd_repair_tile_ctx_t * ctx,
768772
sign tile will be returned. Since the repair_sign links are
769773
reliable, the incoming sign_repair fragments represent a complete
770774
set of the previously sent outgoing messages. However, with
771-
multiple sign tiles, the responses may not arrive in order. But,
775+
multiple sign tiles, the responses may not arrive in order. But,
772776
we can safely process them sequentially as we encounter them in
773777
the deque. */
774778
while( !fd_repair_pending_sign_req_deque_empty( ctx->pending_sign_req_deque ) ) {

0 commit comments

Comments
 (0)