Skip to content

Commit

Permalink
Merge pull request #253 from VanGrx/master
Browse files Browse the repository at this point in the history
[config] Add constants for staking tokens on testnet and stagenet
  • Loading branch information
VanGrx authored Feb 8, 2021
2 parents 6314563 + 9e9fbde commit f40a668
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/cryptonote_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ constexpr uint8_t MAX_SUPPORTED_TX_VERSION = 2;
constexpr uint64_t SAFEX_COMMAND_PROTOCOL_VERSION = 1;

//Safex token stake constants
constexpr uint64_t SAFEX_MINIMUM_TOKEN_STAKE_AMOUNT_FAKECHAIN = 10000 * SAFEX_TOKEN;
constexpr uint64_t SAFEX_MINIMUM_TOKEN_STAKE_AMOUNT_TESTNET = 10000 * SAFEX_TOKEN;
constexpr uint64_t SAFEX_MINIMUM_TOKEN_STAKE_AMOUNT_STAGENET = 10000 * SAFEX_TOKEN;
constexpr uint64_t SAFEX_MINIMUM_TOKEN_STAKE_AMOUNT = 25000 * SAFEX_TOKEN;
constexpr uint64_t SAFEX_DEFAULT_TOKEN_STAKE_EXPIRY_PERIOD = 500000;
constexpr uint64_t SAFEX_DEFAULT_INTERVAL_PERIOD_FAKECHAIN = 10; //blocks
Expand Down
8 changes: 6 additions & 2 deletions src/safex/safex_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,13 @@ namespace safex
{

switch (nettype) {
case cryptonote::network_type::FAKECHAIN:
return SAFEX_MINIMUM_TOKEN_STAKE_AMOUNT_FAKECHAIN;
case cryptonote::network_type::TESTNET:
return SAFEX_MINIMUM_TOKEN_STAKE_AMOUNT;

return SAFEX_MINIMUM_TOKEN_STAKE_AMOUNT_TESTNET;
case cryptonote::network_type::STAGENET:
return SAFEX_MINIMUM_TOKEN_STAKE_AMOUNT_STAGENET;
case cryptonote::network_type::MAINNET:
default:
return SAFEX_MINIMUM_TOKEN_STAKE_AMOUNT;
}
Expand Down

0 comments on commit f40a668

Please sign in to comment.