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-07-01 05:00:49 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             : #include "../context/fd_exec_txn_ctx.h"
      14             : 
      15          24 : #define FD_STAKE_STATE_V2_SZ (200UL)
      16             : 
      17             : FD_PROTOTYPES_BEGIN
      18             : 
      19             : int
      20             : fd_new_warmup_cooldown_rate_epoch( ulong                     slot,
      21             :                                    fd_funk_t *               funk,
      22             :                                    fd_funk_txn_t *           funk_txn,
      23             :                                    fd_spad_t *               spad,
      24             :                                    fd_features_t const *     features,
      25             :                                    /* out */ ulong *         epoch,
      26             :                                    int *                     err );
      27             : 
      28             : /* fd_stake_program_execute is the instruction processing entrypoint
      29             :    for the stake program.  On return, ctx.txn_ctx->dirty_stake_acc==1 if
      30             :    a stake account may have been modified. */
      31             : 
      32             : int
      33             : fd_stake_program_execute( fd_exec_instr_ctx_t * ctx );
      34             : 
      35             : /* Initializes an account which holds configuration used by the stake program.
      36             :    https://github.com/solana-labs/solana/blob/8f2c8b8388a495d2728909e30460aa40dcc5d733/sdk/program/src/stake/config.rs
      37             :  */
      38             : void
      39             : fd_stake_program_config_init( fd_exec_slot_ctx_t * global );
      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             : void
      52             : fd_store_stake_delegation( fd_txn_account_t * stake_account,
      53             :                            fd_bank_t *        bank );
      54             : 
      55             : FD_PROTOTYPES_END
      56             : 
      57             : #endif /* HEADER_fd_src_flamenco_runtime_program_fd_stake_program_h */

Generated by: LCOV version 1.14