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-03-20 12:08:36 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_sysvar_cache_t const * sysvar_cache,
      22             :                                    fd_features_t const *     features,
      23             :                                    /* out */ ulong *         epoch,
      24             :                                    int *                     err );
      25             : 
      26             : /* fd_stake_program_execute is the instruction processing entrypoint
      27             :    for the stake program.  On return, ctx.txn_ctx->dirty_stake_acc==1 if
      28             :    a stake account may have been modified. */
      29             : 
      30             : int
      31             : fd_stake_program_execute( fd_exec_instr_ctx_t * ctx );
      32             : 
      33             : /* Initializes an account which holds configuration used by the stake program.
      34             :    https://github.com/solana-labs/solana/blob/8f2c8b8388a495d2728909e30460aa40dcc5d733/sdk/program/src/stake/config.rs
      35             :  */
      36             : void
      37             : fd_stake_program_config_init( fd_exec_slot_ctx_t * global );
      38             : 
      39             : int
      40             : fd_stake_get_state( fd_txn_account_t const * self,
      41             :                     fd_stake_state_v2_t *    out );
      42             : 
      43             : fd_stake_history_entry_t
      44             : fd_stake_activating_and_deactivating( fd_delegation_t const *    self,
      45             :                                       ulong                      target_epoch,
      46             :                                       fd_stake_history_t const * stake_history,
      47             :                                       ulong *                    new_rate_activation_epoch );
      48             : 
      49             : void
      50             : fd_store_stake_delegation( fd_exec_slot_ctx_t * slot_ctx,
      51             :                            fd_txn_account_t *   stake_account );
      52             : 
      53             : FD_PROTOTYPES_END
      54             : 
      55             : #endif /* HEADER_fd_src_flamenco_runtime_program_fd_stake_program_h */

Generated by: LCOV version 1.14