Browse Source

Set testnet upgrade height to 11600

pull/451/head
miketout 2 years ago
parent
commit
c120d76bd8
  1. 4
      src/pbaas/identity.cpp
  2. 4
      src/pbaas/identity.h
  3. 13
      src/rpc/pbaasrpc.cpp

4
src/pbaas/identity.cpp

@ -19,10 +19,6 @@
#include "identity.h"
#include "txdb.h"
// TODO: HARDENING - remove and dependencies below when 0.9.4 testnet is reset, after this height,
// all authorities of an ID are required to create currencies
uint32_t TESTNET_FORK_HEIGHT = 1;
extern CTxMemPool mempool;
CCommitmentHash::CCommitmentHash(const CTransaction &tx)

4
src/pbaas/identity.h

@ -35,6 +35,10 @@
std::string CleanName(const std::string &Name, uint160 &Parent, bool displayapproved=false, bool addVerus=true);
// TODO: HARDENING - remove and all dependencies below when 0.9.4 testnet is reset, after this height,
// all authorities of an ID are required to create currencies
static const uint32_t TESTNET_FORK_HEIGHT = 11600;
class CCommitmentHash : public CTokenOutput
{
public:

13
src/rpc/pbaasrpc.cpp

@ -10775,6 +10775,10 @@ UniValue updateidentity(const UniValue& params, bool fHelp)
{
throw JSONRPCError(RPC_INVALID_PARAMETER, "Can only used ID control token for ID that has tokenized ID control on this chain");
}
if (IsVerusActive() && chainActive.Height() < TESTNET_FORK_HEIGHT)
{
throw JSONRPCError(RPC_INVALID_PARAMETER, "Tokenized ID control has not yet activated on testnet");
}
}
if (!revocationAuth.IsValid() || !recoveryAuth.IsValid())
@ -11062,6 +11066,10 @@ UniValue revokeidentity(const UniValue& params, bool fHelp)
if (tokenizedIDControl)
{
if (IsVerusActive() && chainActive.Height() < TESTNET_FORK_HEIGHT)
{
throw JSONRPCError(RPC_INVALID_PARAMETER, "Tokenized ID control has not yet activated on testnet");
}
COptCCParams tcP;
CCurrencyValueMap reserveMap;
pwalletMain->AvailableReserveCoins(controlTokenOuts, true, nullptr, false, false, nullptr, &tokenCurrencyControlMap, false);
@ -11246,6 +11254,11 @@ UniValue recoveridentity(const UniValue& params, bool fHelp)
if (tokenizedIDControl)
{
if (IsVerusActive() && chainActive.Height() < TESTNET_FORK_HEIGHT)
{
throw JSONRPCError(RPC_INVALID_PARAMETER, "Tokenized ID control has not yet activated on testnet");
}
COptCCParams tcP;
CCurrencyValueMap reserveMap;

Loading…
Cancel
Save