Skip to content

Commit d2e176e

Browse files
mjain-jumpibhatt-jumptrading
authored andcommitted
fuzz: fix conflicting definitions for loading accounts (#7021)
1 parent 08aa15b commit d2e176e

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

src/flamenco/runtime/tests/fd_block_harness.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ fd_solfuzz_pb_block_ctx_create( fd_solfuzz_runner_t * runner,
297297
vote_states = fd_bank_vote_states_locking_modify( bank );
298298
for( ushort i=0; i<test_ctx->acct_states_count; i++ ) {
299299
fd_txn_account_t acc[1];
300-
fd_solfuzz_pb_load_account( acc, funk, xid, &test_ctx->acct_states[i], 1 );
300+
fd_solfuzz_pb_load_account( acc, accdb, xid, &test_ctx->acct_states[i], 1 );
301301

302302
/* Update vote accounts cache for epoch T */
303303
fd_pubkey_t pubkey;
@@ -621,7 +621,7 @@ fd_solfuzz_pb_build_leader_schedule_effects( fd_solfuzz_runner_t *
621621
/* One ahead of parent epoch, so use current acct_states */
622622
for ( ushort i=0; i<test_ctx->acct_states_count; i++ ) {
623623
fd_txn_account_t acc[1];
624-
fd_solfuzz_pb_load_account( acc, runner->accdb->funk, xid, &test_ctx->acct_states[i], 1 );
624+
fd_solfuzz_pb_load_account( acc, runner->accdb, xid, &test_ctx->acct_states[i], 1 );
625625
fd_pubkey_t pubkey;
626626
memcpy( &pubkey, test_ctx->acct_states[i].address, sizeof(fd_pubkey_t) );
627627
fd_solfuzz_block_register_vote_account( runner->accdb->funk, xid, tmp_vs, &pubkey );

src/flamenco/runtime/tests/fd_harness_common.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include "fd_solfuzz_private.h"
12
#include "generated/context.pb.h"
23
#include "../fd_acc_mgr.h"
34
#include "../../features/fd_features.h"
@@ -26,12 +27,12 @@ fd_solfuzz_pb_load_account( fd_txn_account_t * acc,
2627
fd_funk_rec_prepare_t prepare = {0};
2728

2829
int ok = !!fd_txn_account_init_from_funk_mutable( /* acc */ acc,
29-
/* pubkey */ pubkey,
30-
/* funk */ accdb,
31-
/* xid */ xid,
32-
/* do_create */ 1,
33-
/* min_data_sz */ size,
34-
/* prepare */ &prepare );
30+
/* pubkey */ pubkey,
31+
/* funk */ accdb,
32+
/* xid */ xid,
33+
/* do_create */ 1,
34+
/* min_data_sz */ size,
35+
/* prepare */ &prepare );
3536
assert( ok );
3637

3738
if( state->data ) {

src/flamenco/runtime/tests/fd_instr_harness.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ fd_solfuzz_pb_instr_ctx_create( fd_solfuzz_runner_t * runner,
129129
fd_pubkey_t * acc_key = (fd_pubkey_t *)test_ctx->accounts[j].address;
130130

131131
memcpy( &(txn_ctx->account_keys[j]), test_ctx->accounts[j].address, sizeof(fd_pubkey_t) );
132-
if( !fd_solfuzz_pb_load_account( &accts[j], funk, xid, &test_ctx->accounts[j], 0 ) ) {
132+
if( !fd_solfuzz_pb_load_account( &accts[j], runner->accdb, xid, &test_ctx->accounts[j], 0 ) ) {
133133
return 0;
134134
}
135135

src/flamenco/runtime/tests/fd_solfuzz_private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ FD_PROTOTYPES_BEGIN
1717
zero-lamport accounts from being loaded in. */
1818
int
1919
fd_solfuzz_pb_load_account( fd_txn_account_t * acc,
20-
fd_funk_t * funk,
20+
fd_accdb_user_t * accdb,
2121
fd_funk_txn_xid_t const * xid,
2222
fd_exec_test_acct_state_t const * state,
2323
uchar reject_zero_lamports );

src/flamenco/runtime/tests/fd_txn_harness.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ fd_solfuzz_pb_txn_ctx_create( fd_solfuzz_runner_t * runner,
8282
/* Load the accounts into the account manager
8383
Borrowed accounts get reset anyways - we just need to load the account somewhere */
8484
fd_txn_account_t acc[1];
85-
fd_solfuzz_pb_load_account( acc, funk, &xid, &test_ctx->account_shared_data[i], 1 );
85+
fd_solfuzz_pb_load_account( acc, accdb, &xid, &test_ctx->account_shared_data[i], 1 );
8686
}
8787

8888
/* Setup Bank manager */

0 commit comments

Comments
 (0)