Line data Source code
1 : #ifndef HEADER_fd_src_flamenco_runtime_sysvar_fd_sysvar_recent_hashes_h 2 : #define HEADER_fd_src_flamenco_runtime_sysvar_fd_sysvar_recent_hashes_h 3 : 4 : /* fd_sysvar_recent_hashes.h manages the "recent block hashes" sysvar 5 : account (address SysvarRecentB1ockHashes11111111111111111111). */ 6 : 7 : #include "../fd_bank.h" 8 : 9 : /* FD_SYSVAR_RECENT_HASHES_CAP is the max number of block hash entries 10 : the recent blockhashes sysvar will include. 11 : 12 : https://github.com/anza-xyz/agave/blob/6398ddf6ab8a8f81017bf675ab315a70067f0bf0/sdk/program/src/sysvar/recent_blockhashes.rs#L32 13 : */ 14 : 15 70098 : #define FD_SYSVAR_RECENT_HASHES_CAP (150UL) 16 : 17 : FD_PROTOTYPES_BEGIN 18 : 19 : /* Initialize the recent hashes sysvar account. */ 20 : 21 : void 22 : fd_sysvar_recent_hashes_init( fd_bank_t * bank, 23 : fd_accdb_t * accdb, 24 : fd_capture_ctx_t * capture_ctx ); 25 : 26 : /* Update the recent hashes sysvar account. This should be called at the 27 : start of every slot, before execution commences. */ 28 : 29 : void 30 : fd_sysvar_recent_hashes_update( fd_bank_t * bank, 31 : fd_accdb_t * accdb, 32 : fd_capture_ctx_t * capture_ctx ); 33 : 34 : /* Validate recent hashes sysvar account data. Returns 1 if content is 35 : valid, 0 if not. */ 36 : 37 : int 38 : fd_sysvar_recent_hashes_validate( uchar const * data, 39 : ulong sz ); 40 : 41 : FD_PROTOTYPES_END 42 : 43 : #endif /* HEADER_fd_src_flamenco_runtime_sysvar_fd_sysvar_recent_hashes_h */