Skip to content

Commit

Permalink
add system_account
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Apr 18, 2024
1 parent ba84614 commit 942a66a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions contracts/eosio.system/include/eosio.system/eosio.system.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -753,14 +753,14 @@ namespace eosiosystem {
}

// Returns true/false if the rex system is initialized
static bool rex_system_initialized() {
eosiosystem::rex_pool_table _rexpool( "eosio"_n, "eosio"_n.value );
static bool rex_system_initialized( name system_account = "eosio"_n ) {
eosiosystem::rex_pool_table _rexpool( system_account, system_account.value );
return _rexpool.begin() != _rexpool.end();
}

// Returns true/false if the rex system is available
static bool rex_available() {
eosiosystem::rex_pool_table _rexpool( "eosio"_n, "eosio"_n.value );
static bool rex_available( name system_account = "eosio"_n ) {
eosiosystem::rex_pool_table _rexpool( system_account, system_account.value );
return rex_system_initialized() && _rexpool.begin()->total_rex.amount > 0;
}

Expand Down

0 comments on commit 942a66a

Please sign in to comment.