Skip to content

Commit

Permalink
Maximum masternode fee for mobile wallets
Browse files Browse the repository at this point in the history
  • Loading branch information
Pluracoin committed Jun 14, 2021
1 parent 8e2288d commit 4f699b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/CryptoNoteConfig.h
Expand Up @@ -57,6 +57,7 @@ const size_t CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE_CURRENT = CRYPTONOTE_BL
const size_t CRYPTONOTE_COINBASE_BLOB_RESERVED_SIZE = 600;
const size_t CRYPTONOTE_DISPLAY_DECIMAL_POINT = 10;

const uint64_t MAXIMUM_MASTERNODE_FEE = UINT64_C(100000000000);
const uint64_t MINIMUM_FEE = UINT64_C(100000000);
const uint64_t MAXIMUM_FEE = UINT64_C(100000000);
const uint64_t MINIMUM_FEE_V1 = UINT64_C(100000000);
Expand Down
11 changes: 8 additions & 3 deletions src/Daemon/Daemon.cpp
Expand Up @@ -448,12 +448,17 @@ int main(int argc, char* argv[])
logger(ERROR, BRIGHT_RED) << "Couldn't parse fee amount";
return 1;
}
if (fee > CryptoNote::parameters::COIN) {
logger(ERROR, BRIGHT_RED) << "Maximum allowed fee is "
<< Common::Format::formatAmount(CryptoNote::parameters::COIN);

if (fee > CryptoNote::parameters::MAXIMUM_MASTERNODE_FEE) {
logger(ERROR, BRIGHT_RED) << "Maximum allowed masternode fee is "
<< Common::Format::formatAmount(CryptoNote::parameters::MAXIMUM_MASTERNODE_FEE);
return 1;
}

if(fee) {
logger(INFO) << "CEPS masternode fee set to " << rpcConfig.nodeFeeAmountStr << " PLURA";
}

rpcServer.setFeeAmount(fee);
}

Expand Down

0 comments on commit 4f699b9

Please sign in to comment.