Skip to content

Commit

Permalink
Merge pull request #230 from VanGrx/develop
Browse files Browse the repository at this point in the history
Add stagenet token lock, stake and interval params
  • Loading branch information
VanGrx authored Jun 15, 2020
2 parents 31fd2ab + 816ca10 commit bfcbb6c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cryptonote_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,11 @@ constexpr uint64_t SAFEX_MINIMUM_TOKEN_STAKE_AMOUNT = 10000
constexpr uint64_t SAFEX_DEFAULT_TOKEN_STAKE_EXPIRY_PERIOD = 500000;
constexpr uint64_t SAFEX_DEFAULT_INTERVAL_PERIOD_FAKECHAIN = 10; //blocks
constexpr uint64_t SAFEX_DEFAULT_INTERVAL_PERIOD_TESTNET = 10; //blocks
constexpr uint64_t SAFEX_DEFAULT_INTERVAL_PERIOD_STAGENET = 100; //blocks
constexpr uint64_t SAFEX_DEFAULT_INTERVAL_PERIOD = 1000; //blocks
constexpr uint64_t SAFEX_DEFAULT_MINUMUM_TOKEN_STAKE_PERIOD_FAKECHAIN = SAFEX_DEFAULT_INTERVAL_PERIOD_FAKECHAIN*3; //blocks
constexpr uint64_t SAFEX_DEFAULT_MINUMUM_TOKEN_STAKE_PERIOD_TESTNET = SAFEX_DEFAULT_INTERVAL_PERIOD_TESTNET*1; //blocks
constexpr uint64_t SAFEX_DEFAULT_MINUMUM_TOKEN_STAKE_PERIOD_STAGENET = SAFEX_DEFAULT_INTERVAL_PERIOD_STAGENET*10; //blocks
constexpr uint64_t SAFEX_DEFAULT_MINUMUM_TOKEN_STAKE_PERIOD = SAFEX_DEFAULT_INTERVAL_PERIOD*10; //blocks

//Safex network fee constants
Expand All @@ -191,7 +193,8 @@ constexpr uint64_t SAFEX_DEFAULT_NETWORK_FEE_PERCENTAGE = 5;
constexpr uint64_t SAFEX_CREATE_ACCOUNT_TOKEN_LOCK_FEE = 100*SAFEX_TOKEN;
constexpr uint64_t SAFEX_CREATE_ACCOUNT_TOKEN_LOCK_PERIOD_FAKECHAIN = 1;
constexpr uint64_t SAFEX_CREATE_ACCOUNT_TOKEN_LOCK_PERIOD_TESTNET = 10;
constexpr uint64_t SAFEX_CREATE_ACCOUNT_TOKEN_LOCK_PERIOD = 150;// TBD
constexpr uint64_t SAFEX_CREATE_ACCOUNT_TOKEN_LOCK_PERIOD_STAGENET = 300;
constexpr uint64_t SAFEX_CREATE_ACCOUNT_TOKEN_LOCK_PERIOD = 1500;// TBD

//Safex account constants
constexpr uint64_t SAFEX_ACCOUNT_USERNAME_MAX_SIZE = 32;
Expand Down
6 changes: 6 additions & 0 deletions src/safex/safex_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ namespace safex
return SAFEX_DEFAULT_INTERVAL_PERIOD_FAKECHAIN;
else if (nettype == cryptonote::network_type::TESTNET)
return SAFEX_DEFAULT_INTERVAL_PERIOD_TESTNET;
else if (nettype == cryptonote::network_type::STAGENET)
return SAFEX_DEFAULT_INTERVAL_PERIOD_STAGENET;
else
return SAFEX_DEFAULT_INTERVAL_PERIOD;
}
Expand Down Expand Up @@ -221,6 +223,8 @@ namespace safex
return SAFEX_DEFAULT_MINUMUM_TOKEN_STAKE_PERIOD_FAKECHAIN;
else if (nettype == cryptonote::network_type::TESTNET)
return SAFEX_DEFAULT_MINUMUM_TOKEN_STAKE_PERIOD_TESTNET;
else if(nettype == cryptonote::network_type::STAGENET)
return SAFEX_DEFAULT_MINUMUM_TOKEN_STAKE_PERIOD_STAGENET;
else
return SAFEX_DEFAULT_MINUMUM_TOKEN_STAKE_PERIOD;
}
Expand All @@ -236,6 +240,8 @@ namespace safex
return SAFEX_CREATE_ACCOUNT_TOKEN_LOCK_PERIOD_FAKECHAIN;
else if (nettype == cryptonote::network_type::TESTNET)
return SAFEX_CREATE_ACCOUNT_TOKEN_LOCK_PERIOD_TESTNET;
else if(nettype == cryptonote::network_type::STAGENET)
return SAFEX_CREATE_ACCOUNT_TOKEN_LOCK_PERIOD_STAGENET;
else
return SAFEX_CREATE_ACCOUNT_TOKEN_LOCK_PERIOD;
}
Expand Down

0 comments on commit bfcbb6c

Please sign in to comment.