@@ -130,6 +130,8 @@ struct fd_repair_tile_ctx {
130
130
131
131
fd_wksp_t * wksp ;
132
132
133
+ fd_stem_context_t * stem ;
134
+
133
135
uchar in_kind [ MAX_IN_LINKS ];
134
136
fd_repair_in_ctx_t in_links [ MAX_IN_LINKS ];
135
137
@@ -444,7 +446,7 @@ fd_repair_sign_and_send( fd_repair_tile_ctx_t * repair_tile_ctx,
444
446
handle_new_cluster_contact_info, we prepay the RTT cost by sending
445
447
a placeholder Repair request immediately.
446
448
447
- 2. ASYNCHRONOUS REQUEST HANDLING
449
+ 2. ASYNCHRONOUS REQUEST HANDLING
448
450
--------------------------------
449
451
Used strictly for repair requests. These requests are sent to the
450
452
sign tile, and the repair tile continues handling other operations
@@ -533,11 +535,8 @@ fd_repair_send_request_async( fd_repair_tile_ctx_t * ctx,
533
535
534
536
fd_repair_pending_sign_req_t * pending = fd_repair_pending_sign_req_deque_push_tail_nocopy ( ctx -> pending_sign_req_deque );
535
537
536
- /* Use the unified sign_and_send function in async mode */
537
538
fd_repair_sign_and_send ( ctx , & protocol , & peer -> addr , pending -> buf , sizeof (pending -> buf ), 1 , nonce );
538
539
539
- /* Since async requests don't complete the buffer with signature,
540
- we need to track the encoded length */
541
540
fd_bincode_encode_ctx_t encode_ctx = { .data = pending -> buf , .dataend = pending -> buf + sizeof (pending -> buf ) };
542
541
if ( FD_UNLIKELY ( fd_repair_protocol_encode ( & protocol , & encode_ctx ) != FD_BINCODE_SUCCESS ) ) {
543
542
FD_LOG_CRIT (( "Failed to encode repair message (type %#x)" , protocol .discriminant ));
@@ -670,7 +669,7 @@ during_frag( fd_repair_tile_ctx_t * ctx,
670
669
fd_memcpy ( ctx -> buffer , dcache_entry , dcache_entry_sz );
671
670
}
672
671
673
- static ulong
672
+ static ulong FD_FN_UNUSED
674
673
fd_repair_send_ping ( fd_repair_tile_ctx_t * repair_tile_ctx ,
675
674
fd_repair_t * glob ,
676
675
fd_pinged_elem_t * val ,
@@ -697,7 +696,7 @@ fd_repair_send_ping( fd_repair_tile_ctx_t * repair_tile_ctx,
697
696
return (ulong )((uchar * )ctx .data - buf );
698
697
}
699
698
700
- static void
699
+ static void FD_FN_UNUSED
701
700
fd_repair_recv_pong (fd_repair_t * glob , fd_gossip_ping_t const * pong , fd_gossip_peer_addr_t const * from ) {
702
701
fd_pinged_elem_t * val = fd_pinged_table_query (glob -> pinged , from , NULL );
703
702
if ( val == NULL || !fd_pubkey_eq ( & val -> id , & pong -> from ) )
@@ -747,6 +746,8 @@ after_frag( fd_repair_tile_ctx_t * ctx,
747
746
748
747
if ( FD_UNLIKELY ( ctx -> skip_frag ) ) return ;
749
748
749
+ ctx -> stem = stem ;
750
+
750
751
uint in_kind = ctx -> in_kind [ in_idx ];
751
752
// FD_LOG_INFO(( "in_idx: %lu, in_kind: %u", in_idx, in_kind ));
752
753
if ( FD_UNLIKELY ( in_kind == IN_KIND_CONTACT ) ) {
@@ -768,7 +769,7 @@ after_frag( fd_repair_tile_ctx_t * ctx,
768
769
sign tile will be returned. Since the repair_sign links are
769
770
reliable, the incoming sign_repair fragments represent a complete
770
771
set of the previously sent outgoing messages. However, with
771
- multiple sign tiles, the responses may not arrive in order. But,
772
+ multiple sign tiles, the responses may not arrive in order. But,
772
773
we can safely process them sequentially as we encounter them in
773
774
the deque. */
774
775
while ( !fd_repair_pending_sign_req_deque_empty ( ctx -> pending_sign_req_deque ) ) {
@@ -1195,7 +1196,7 @@ unprivileged_init( fd_topo_t * topo,
1195
1196
1196
1197
if ( ctx -> in_kind [ in_idx ] == IN_KIND_SIGN ) {
1197
1198
// fd_wksp_t * wksp = fd_wksp_containing( link->dcache );
1198
- // FD_LOG_NOTICE(( "repair tile: link %s[%lu] mem=%p, dcache=%p, wksp=%p, wksp_name=%s, in_idx=%u",
1199
+ // FD_LOG_NOTICE(( "repair tile: link %s[%lu] mem=%p, dcache=%p, wksp=%p, wksp_name=%s, in_idx=%u",
1199
1200
// link->name, link->kind_id,
1200
1201
// (void*)ctx->in_links[ in_idx ].mem,
1201
1202
// link->dcache,
0 commit comments