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

Generated by: LCOV version 1.14