Skip to content

Commit 0914a46

Browse files
jherrera-jumpripatel-fd
authored andcommitted
pack, poh: fix done_packing
1 parent 705fcfb commit 0914a46

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/disco/pack/fd_pack_tile.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,14 @@ after_credit( fd_pack_ctx_t * ctx,
756756
increment it here. */
757757
FD_MCNT_INC( PACK, MICROBLOCK_PER_BLOCK_LIMIT, 1UL );
758758
log_end_block_metrics( ctx, now, "microblock" );
759+
760+
fd_done_packing_t * done_packing = fd_chunk_to_laddr( ctx->poh_out_mem, ctx->poh_out_chunk );
761+
done_packing->microblocks_in_slot = ctx->slot_microblock_cnt;
762+
763+
fd_stem_publish( stem, 1UL, fd_disco_bank_sig( ctx->leader_slot, ctx->pack_idx ), ctx->poh_out_chunk, sizeof(fd_done_packing_t), 0UL, 0UL, fd_frag_meta_ts_comp( fd_tickcount() ) );
764+
ctx->poh_out_chunk = fd_dcache_compact_next( ctx->poh_out_chunk, sizeof(fd_done_packing_t), ctx->poh_out_chunk0, ctx->poh_out_wmark );
765+
ctx->pack_idx++;
766+
759767
ctx->drain_banks = 1;
760768
ctx->leader_slot = ULONG_MAX;
761769
ctx->slot_microblock_cnt = 0UL;

src/discoh/poh/fd_poh_tile.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,7 +1506,7 @@ after_credit( fd_poh_ctx_t * ctx,
15061506

15071507
/* We don't want to tick over (finish) the slot until pack tell us
15081508
it's done. */
1509-
if( FD_LIKELY( !ctx->slot_done && is_leader ) ) max_remaining_microblocks = fd_ulong_max( 1UL, max_remaining_microblocks );
1509+
if( FD_LIKELY( !ctx->slot_done && is_leader && max_remaining_microblocks==0UL ) ) return;
15101510

15111511
/* With hashcnt_per_tick hashes per tick, we actually get
15121512
hashcnt_per_tick-1 chances to mixin a microblock. For each tick
@@ -1815,12 +1815,9 @@ during_frag( fd_poh_ctx_t * ctx,
18151815

18161816
ulong slot;
18171817
switch( ctx->in_kind[ in_idx ] ) {
1818-
case IN_KIND_BANK: {
1819-
slot = fd_disco_bank_sig_slot( sig );
1820-
break;
1821-
}
1818+
case IN_KIND_BANK:
18221819
case IN_KIND_PACK: {
1823-
slot = fd_disco_poh_sig_slot( sig );
1820+
slot = fd_disco_bank_sig_slot( sig );
18241821
break;
18251822
}
18261823
default:

0 commit comments

Comments
 (0)