LCOV - code coverage report
Current view: top level - flamenco/runtime/sysvar - fd_sysvar_rent.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 1 1 100.0 %
Date: 2026-01-13 05:01:51 Functions: 0 0 -

          Line data    Source code
       1             : #ifndef HEADER_fd_src_flamenco_runtime_sysvar_fd_sysvar_rent_h
       2             : #define HEADER_fd_src_flamenco_runtime_sysvar_fd_sysvar_rent_h
       3             : 
       4             : #include "fd_sysvar_base.h"
       5             : #include "../../accdb/fd_accdb_user.h"
       6             : #include "../../types/fd_types.h"
       7             : 
       8             : /* SIMD-0194: deprecate_rent_exemption_threshold
       9             :    https://github.com/anza-xyz/agave/blob/v3.1.4/runtime/src/bank.rs#L5322-L5329 */
      10           3 : #define FD_SIMD_0194_NEW_RENT_EXEMPTION_THRESHOLD (1.0)
      11             : 
      12             : FD_PROTOTYPES_BEGIN
      13             : 
      14             : /* fd_sysvar_rent_init copies the cached rent sysvar stored from
      15             :    the bank to the corresponding account in the database.
      16             :    Note that it does NOT initialize global->bank.rent */
      17             : 
      18             : void
      19             : fd_sysvar_rent_init( fd_bank_t *               bank,
      20             :                      fd_accdb_user_t *         accdb,
      21             :                      fd_funk_txn_xid_t const * xid,
      22             :                      fd_capture_ctx_t *        capture_ctx );
      23             : 
      24             : /* fd_sysvar_rent_write writes the current value of the rent sysvar to funk. */
      25             : 
      26             : void
      27             : fd_sysvar_rent_write( fd_bank_t *               bank,
      28             :                       fd_accdb_user_t *         accdb,
      29             :                       fd_funk_txn_xid_t const * xid,
      30             :                       fd_capture_ctx_t *        capture_ctx,
      31             :                       fd_rent_t const *         rent );
      32             : 
      33             : /* fd_rent_exempt_minimum_balance returns the minimum balance needed
      34             :    for an account with the given data_len to be rent exempt.  rent
      35             :    points to the current rent parameters. */
      36             : 
      37             : ulong
      38             : fd_rent_exempt_minimum_balance( fd_rent_t const * rent,
      39             :                                 ulong             data_len );
      40             : 
      41             : /* fd_sysvar_rent_read reads the current value of the rent sysvar from
      42             :    funk. If the account doesn't exist in funk or if the account
      43             :    has zero lamports, this function returns NULL. */
      44             : 
      45             : fd_rent_t const *
      46             : fd_sysvar_rent_read( fd_accdb_user_t *         accdb,
      47             :                      fd_funk_txn_xid_t const * xid,
      48             :                      fd_rent_t *               rent );
      49             : 
      50             : FD_PROTOTYPES_END
      51             : 
      52             : #endif /* HEADER_fd_src_flamenco_runtime_sysvar_fd_sysvar_rent_h */
      53             : 

Generated by: LCOV version 1.14