LCOV - code coverage report
Current view: top level - flamenco/runtime/sysvar - fd_sysvar_recent_hashes.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 1 1 100.0 %
Date: 2026-05-26 08:02:49 Functions: 0 0 -

          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_flamenco_base.h"
       8             : #include "../../accdb/fd_accdb_user.h"
       9             : #include "fd_sysvar_base.h"
      10             : 
      11             : /* FD_SYSVAR_RECENT_HASHES_CAP is the max number of block hash entries
      12             :    the recent blockhashes sysvar will include.
      13             : 
      14             :    https://github.com/anza-xyz/agave/blob/6398ddf6ab8a8f81017bf675ab315a70067f0bf0/sdk/program/src/sysvar/recent_blockhashes.rs#L32
      15             : */
      16             : 
      17       70056 : #define FD_SYSVAR_RECENT_HASHES_CAP (150UL)
      18             : 
      19             : FD_PROTOTYPES_BEGIN
      20             : 
      21             : /* The recent hashes sysvar */
      22             : 
      23             : /* Initialize the recent hashes sysvar account. */
      24             : void
      25             : fd_sysvar_recent_hashes_init( fd_bank_t *               bank,
      26             :                               fd_accdb_user_t *         accdb,
      27             :                               fd_funk_txn_xid_t const * xid,
      28             :                               fd_capture_ctx_t *        capture_ctx );
      29             : 
      30             : /* Update the recent hashes sysvar account. This should be called at the start of every slot, before execution commences. */
      31             : void
      32             : fd_sysvar_recent_hashes_update( fd_bank_t *               bank,
      33             :                                 fd_accdb_user_t *         accdb,
      34             :                                 fd_funk_txn_xid_t const * xid,
      35             :                                 fd_capture_ctx_t *        capture_ctx );
      36             : 
      37             : /* Validate recent hashes sysvar account data.  Returns 1 if content is
      38             :    valid, 0 if not. */
      39             : 
      40             : int
      41             : fd_sysvar_recent_hashes_validate( uchar const * data,
      42             :                                   ulong         sz );
      43             : 
      44             : FD_PROTOTYPES_END
      45             : 
      46             : #endif /* HEADER_fd_src_flamenco_runtime_sysvar_fd_sysvar_recent_hashes_h */

Generated by: LCOV version 1.14