Skip to content

Commit c6779f4

Browse files
initial
1 parent 7cc5bfb commit c6779f4

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

src/flamenco/fd_flamenco_base.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,17 @@ struct fd_account_meta {
116116
};
117117
typedef struct fd_account_meta fd_account_meta_t;
118118

119+
struct fd_account {
120+
uchar pubkey[32UL];
121+
fd_account_meta_t * meta;
122+
};
123+
typedef struct fd_account fd_account_t;
124+
125+
FD_FN_PURE static inline uchar *
126+
fd_account_data( fd_account_t const * acc ) {
127+
return (uchar *)( acc->meta+1 );
128+
}
129+
119130
FD_PROTOTYPES_BEGIN
120131

121132
/* fd_acct_addr_cstr converts the given Solana address into a base58-

src/flamenco/runtime/fd_executor.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,6 +1535,9 @@ fd_executor_setup_txn_account( fd_runtime_t * runtime,
15351535
FD_LOG_CRIT(( "Failed to join txn account" ));
15361536
}
15371537

1538+
memcpy( &txn_out->accounts.pubkeys[idx], acc, sizeof(fd_pubkey_t) );
1539+
txn_out->accounts.metas[ idx ] = account_meta;
1540+
15381541
return txn_account;
15391542
}
15401543

src/flamenco/runtime/fd_runtime.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ struct fd_txn_out {
216216
/* If the transaction has a nonce account that must be advanced,
217217
this would be !=ULONG_MAX. */
218218
fd_txn_account_t rollback_fee_payer[ 1 ];
219+
220+
fd_pubkey_t pubkeys[ MAX_TX_ACCOUNT_LOCKS ];
221+
fd_account_meta_t * metas[ MAX_TX_ACCOUNT_LOCKS ];
219222
} accounts;
220223
};
221224
typedef struct fd_txn_out fd_txn_out_t;

0 commit comments

Comments
 (0)