Skip to content

Commit

Permalink
Disable minting loan token on mainnet (#878)
Browse files Browse the repository at this point in the history
Signed-off-by: Anthony Fieroni <[email protected]>
  • Loading branch information
bvbfan authored Nov 8, 2021
1 parent ea9fbca commit 8c74682
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/masternodes/mn_checks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,10 @@ class CCustomTxVisitor : public boost::static_visitor<Res>
if (token.IsPoolShare()) {
return Res::Err("can't mint LPS token %s!", id.ToString());
}

static const auto isMainNet = Params().NetworkIDString() == CBaseChainParams::MAIN;
// may be different logic with LPS, so, dedicated check:
if (!token.IsMintable()) {
if (!token.IsMintable() || (isMainNet && mnview.GetLoanTokenByID(id))) {
return Res::Err("token %s is not mintable!", id.ToString());
}

Expand Down

0 comments on commit 8c74682

Please sign in to comment.