From 248b21ebf2ee9afd39d946b9e9182ff928dc1043 Mon Sep 17 00:00:00 2001 From: Alex Siegel Date: Mon, 18 Nov 2024 15:35:05 +0000 Subject: [PATCH] asiegel/scratch-fix: fixed missing scratch scope --- src/app/fdctl/run/tiles/fd_replay.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/app/fdctl/run/tiles/fd_replay.c b/src/app/fdctl/run/tiles/fd_replay.c index a7f8f248db..0cd455f9f8 100644 --- a/src/app/fdctl/run/tiles/fd_replay.c +++ b/src/app/fdctl/run/tiles/fd_replay.c @@ -730,17 +730,20 @@ send_tower_sync( fd_replay_tile_ctx_t * ctx ) { /* Build a vote state update based on current tower votes. */ - fd_compact_vote_state_update_t update; - fd_tower_to_tower_sync( ctx->tower, vote_bank_hash, &update ); + FD_SCRATCH_SCOPE_BEGIN { + fd_compact_vote_state_update_t update; + fd_tower_to_tower_sync( ctx->tower, vote_bank_hash, &update ); + + /* Send a vote txn. */ - /* Send a vote txn. */ + fd_txn_p_t * txn = (fd_txn_p_t *)fd_chunk_to_laddr( ctx->sender_out_mem, ctx->sender_out_chunk ); + txn->payload_sz = fd_voter_txn_generate( ctx->voter, + &update, + vote_block_hash, + txn->_, + txn->payload ); + } FD_SCRATCH_SCOPE_END; - fd_txn_p_t * txn = (fd_txn_p_t *)fd_chunk_to_laddr( ctx->sender_out_mem, ctx->sender_out_chunk ); - txn->payload_sz = fd_voter_txn_generate( ctx->voter, - &update, - vote_block_hash, - txn->_, - txn->payload ); ulong msg_sz = sizeof( fd_txn_p_t ); fd_mcache_publish( ctx->sender_out_mcache, ctx->sender_out_depth,