Line data Source code
1 : #ifndef HEADER_fd_src_flamenco_runtime_sysvar_fd_recent_hashes_h 2 : #define HEADER_fd_src_flamenco_runtime_sysvar_fd_recent_hashes_h 3 : 4 : #include "../../types/fd_types.h" 5 : #include "../../fd_flamenco_base.h" 6 : #include "../../../funk/fd_funk.h" 7 : 8 : /* FD_SYSVAR_RECENT_HASHES_CAP is the max number of block hash entries 9 : the recent blockhashes sysvar will include. 10 : 11 : https://github.com/anza-xyz/agave/blob/6398ddf6ab8a8f81017bf675ab315a70067f0bf0/sdk/program/src/sysvar/recent_blockhashes.rs#L32 12 : */ 13 : 14 69309 : #define FD_SYSVAR_RECENT_HASHES_CAP (150UL) 15 : 16 : FD_PROTOTYPES_BEGIN 17 : 18 : /* The recent hashes sysvar */ 19 : 20 : /* Initialize the recent hashes sysvar account. */ 21 : void 22 : fd_sysvar_recent_hashes_init( fd_exec_slot_ctx_t * slot_ctx ); 23 : 24 : /* Update the recent hashes sysvar account. This should be called at the start of every slot, before execution commences. */ 25 : void 26 : fd_sysvar_recent_hashes_update( fd_exec_slot_ctx_t * slot_ctx ); 27 : 28 : 29 : /* fd_sysvar_recent_hashes_read reads the recent hashes sysvar from funk. 30 : If the account doesn't exist in funk or if the account has zero 31 : lamports, this function returns NULL. */ 32 : 33 : fd_recent_block_hashes_t * 34 : fd_sysvar_recent_hashes_read( fd_funk_t * funk, fd_funk_txn_t * funk_txn, fd_spad_t * spad ); 35 : 36 : FD_PROTOTYPES_END 37 : 38 : #endif /* HEADER_fd_src_flamenco_runtime_sysvar_fd_recent_hashes_h */