LCOV - code coverage report
Current view: top level - flamenco/runtime/program - fd_stake_program.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 1 1 100.0 %
Date: 2025-12-04 04:56:06 Functions: 0 0 -

          Line data    Source code
       1             : #ifndef HEADER_fd_src_flamenco_runtime_program_fd_stake_program_h
       2             : #define HEADER_fd_src_flamenco_runtime_program_fd_stake_program_h
       3             : 
       4             : /* The stake program (native program) allows users to stake their coins
       5             :    on a validator (registered with the vote program).  The user
       6             :    receives inflation rewards for doing so.  The slot boundary will read
       7             :    and write accounts owned by the stake program (e.g. to determine
       8             :    validator stake weights and pay out staking rewards).
       9             : 
      10             :    Address: Stake11111111111111111111111111111111111111 */
      11             : 
      12             : #include "../context/fd_exec_instr_ctx.h"
      13             : 
      14          24 : #define FD_STAKE_STATE_V2_SZ (200UL)
      15             : 
      16             : FD_PROTOTYPES_BEGIN
      17             : 
      18             : int
      19             : fd_new_warmup_cooldown_rate_epoch(
      20             :     fd_epoch_schedule_t const * epoch_schedule,
      21             :     fd_features_t const *       features,
      22             :     ulong                       slot,
      23             :     /* out */ ulong *           epoch,
      24             :     int *                       err
      25             : );
      26             : 
      27             : /* fd_stake_program_execute is the instruction processing entrypoint
      28             :    for the stake program.  On return, ctx.txn_ctx->dirty_stake_acc==1 if
      29             :    a stake account may have been modified. */
      30             : 
      31             : int
      32             : fd_stake_program_execute( fd_exec_instr_ctx_t * ctx );
      33             : 
      34             : /* Initializes an account which holds configuration used by the stake program.
      35             :    https://github.com/solana-labs/solana/blob/8f2c8b8388a495d2728909e30460aa40dcc5d733/sdk/program/src/stake/config.rs
      36             :  */
      37             : void
      38             : fd_stake_program_config_init( fd_accdb_user_t *         accdb,
      39             :                               fd_funk_txn_xid_t const * xid );
      40             : 
      41             : int
      42             : fd_stake_get_state( fd_txn_account_t const * self,
      43             :                     fd_stake_state_v2_t *    out );
      44             : 
      45             : fd_stake_history_entry_t
      46             : fd_stake_activating_and_deactivating( fd_delegation_t const *    self,
      47             :                                       ulong                      target_epoch,
      48             :                                       fd_stake_history_t const * stake_history,
      49             :                                       ulong *                    new_rate_activation_epoch );
      50             : 
      51             : FD_PROTOTYPES_END
      52             : 
      53             : #endif /* HEADER_fd_src_flamenco_runtime_program_fd_stake_program_h */

Generated by: LCOV version 1.14