Skip to content

Commit b3a4e0a

Browse files
committed
Remove unused 'wksp' argument from decode_ctx
1 parent 7a8ff73 commit b3a4e0a

7 files changed

+8
-19
lines changed

src/flamenco/runtime/fd_executor.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,7 @@ status_check_tower( ulong slot, void * _ctx ) {
273273

274274
fd_slot_history_global_t * slot_history = fd_sysvar_slot_history_read( ctx->funk,
275275
ctx->funk_txn,
276-
ctx->spad,
277-
ctx->spad_wksp );
276+
ctx->spad );
278277

279278
if( fd_sysvar_slot_history_find_slot( slot_history,
280279
slot,

src/flamenco/runtime/sysvar/fd_sysvar_cache.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ fd_sysvar_cache_restore_##name(
122122
type##_decode() does not do heap allocations on failure */ \
123123
fd_bincode_decode_ctx_t decode = { \
124124
.data = account->vt->get_data( account ), \
125-
.dataend = account->vt->get_data( account ) + account->vt->get_data_len( account ), \
126-
.wksp = wksp \
125+
.dataend = account->vt->get_data( account ) + account->vt->get_data_len( account ) \
127126
}; \
128127
ulong total_sz = 0UL; \
129128
int err = type##_decode_footprint( &decode, &total_sz ); \

src/flamenco/runtime/sysvar/fd_sysvar_slot_hashes.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@ fd_sysvar_slot_hashes_read( fd_exec_slot_ctx_t * slot_ctx,
147147

148148
fd_bincode_decode_ctx_t decode = {
149149
.data = rec->vt->get_data( rec ),
150-
.dataend = rec->vt->get_data( rec ) + rec->vt->get_data_len( rec ),
151-
.wksp = slot_ctx->runtime_wksp
150+
.dataend = rec->vt->get_data( rec ) + rec->vt->get_data_len( rec )
152151
};
153152

154153
ulong total_sz = 0UL;

src/flamenco/runtime/sysvar/fd_sysvar_slot_history.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ fd_sysvar_slot_history_update( fd_exec_slot_ctx_t * slot_ctx, fd_spad_t * runtim
9797

9898
fd_bincode_decode_ctx_t ctx = {
9999
.data = rec->vt->get_data( rec ),
100-
.dataend = rec->vt->get_data( rec ) + rec->vt->get_data_len( rec ),
101-
.wksp = slot_ctx->runtime_wksp
100+
.dataend = rec->vt->get_data( rec ) + rec->vt->get_data_len( rec )
102101
};
103102

104103
ulong total_sz = 0UL;
@@ -148,8 +147,7 @@ fd_sysvar_slot_history_update( fd_exec_slot_ctx_t * slot_ctx, fd_spad_t * runtim
148147
fd_slot_history_global_t *
149148
fd_sysvar_slot_history_read( fd_funk_t * funk,
150149
fd_funk_txn_t * funk_txn,
151-
fd_spad_t * spad,
152-
fd_wksp_t * wksp ) {
150+
fd_spad_t * spad ) {
153151

154152
/* Set current_slot, and update next_slot */
155153

@@ -163,8 +161,7 @@ fd_sysvar_slot_history_read( fd_funk_t * funk,
163161

164162
fd_bincode_decode_ctx_t ctx = {
165163
.data = rec->vt->get_data( rec ),
166-
.dataend = rec->vt->get_data( rec ) + rec->vt->get_data_len( rec ),
167-
.wksp = wksp
164+
.dataend = rec->vt->get_data( rec ) + rec->vt->get_data_len( rec )
168165
};
169166

170167
ulong total_sz = 0UL;

src/flamenco/runtime/sysvar/fd_sysvar_slot_history.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ fd_sysvar_slot_history_update( fd_exec_slot_ctx_t * slot_ctx,
2828
fd_slot_history_global_t *
2929
fd_sysvar_slot_history_read( fd_funk_t * funk,
3030
fd_funk_txn_t * funk_txn,
31-
fd_spad_t * spad,
32-
fd_wksp_t * wksp );
31+
fd_spad_t * spad );
3332

3433
int
3534
fd_sysvar_slot_history_find_slot( fd_slot_history_global_t const * history,

src/flamenco/types/fd_bincode.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ struct fd_bincode_decode_ctx {
3636
void const * data;
3737
/* End of buffer */
3838
void const * dataend;
39-
/* Wksp for laddr to gaddr conversions */
40-
/* TODO: This could be split out into a fd_bincode_global_decode_ctx */
41-
fd_wksp_t * wksp;
4239
};
4340
typedef struct fd_bincode_decode_ctx fd_bincode_decode_ctx_t;
4441

src/flamenco/types/test_types_fixtures.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,7 @@ test_idempotent( test_fixture_t const * t, fd_spad_t * spad, fd_wksp_t * wksp )
197197
ulong bin_sz = *t->bin_sz;
198198
fd_bincode_decode_ctx_t decode[1] = {{
199199
.data = t->bin,
200-
.dataend = t->bin + bin_sz,
201-
.wksp = wksp
200+
.dataend = t->bin + bin_sz
202201
}};
203202

204203
ulong total_sz = 0UL;

0 commit comments

Comments
 (0)