Merge pull request #790 from libscott/non-fungible-chains
ac_cc under 1000 is not fungible
This commit is contained in:
@@ -54,6 +54,9 @@ bool Eval::ImportCoin(const std::vector<uint8_t> params, const CTransaction &imp
|
|||||||
if (targetCcid != GetAssetchainsCC() || targetSymbol != GetAssetchainsSymbol())
|
if (targetCcid != GetAssetchainsCC() || targetSymbol != GetAssetchainsSymbol())
|
||||||
return Invalid("importcoin-wrong-chain");
|
return Invalid("importcoin-wrong-chain");
|
||||||
|
|
||||||
|
if (targetCcid <= 1000)
|
||||||
|
return Invalid("chain-not-fungible");
|
||||||
|
|
||||||
// check burn amount
|
// check burn amount
|
||||||
{
|
{
|
||||||
uint64_t burnAmount = burnTx.vout[0].nValue;
|
uint64_t burnAmount = burnTx.vout[0].nValue;
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ uint256 CalculateProofRoot(const char* symbol, uint32_t targetCCid, int kmdHeigh
|
|||||||
* > scan backwards >
|
* > scan backwards >
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (targetCCid <= 1)
|
if (targetCCid < 2)
|
||||||
return uint256();
|
return uint256();
|
||||||
|
|
||||||
if (kmdHeight < 0 || kmdHeight > chainActive.Height())
|
if (kmdHeight < 0 || kmdHeight > chainActive.Height())
|
||||||
|
|||||||
@@ -153,8 +153,8 @@ UniValue migrate_converttoexport(const UniValue& params, bool fHelp)
|
|||||||
"import transaction.\n"
|
"import transaction.\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
if (ASSETCHAINS_CC < 2)
|
if (ASSETCHAINS_CC <= 1000)
|
||||||
throw runtime_error("-ac_cc < 2");
|
throw runtime_error("-ac_cc <= 1000");
|
||||||
|
|
||||||
if (ASSETCHAINS_SYMBOL[0] == 0)
|
if (ASSETCHAINS_SYMBOL[0] == 0)
|
||||||
throw runtime_error("Must be called on assetchain");
|
throw runtime_error("Must be called on assetchain");
|
||||||
@@ -208,8 +208,8 @@ UniValue migrate_createimporttransaction(const UniValue& params, bool fHelp)
|
|||||||
throw runtime_error("migrate_createimporttransaction burnTx payouts\n\n"
|
throw runtime_error("migrate_createimporttransaction burnTx payouts\n\n"
|
||||||
"Create an importTx given a burnTx and the corresponding payouts, hex encoded");
|
"Create an importTx given a burnTx and the corresponding payouts, hex encoded");
|
||||||
|
|
||||||
if (ASSETCHAINS_CC < 2)
|
if (ASSETCHAINS_CC <= 1000)
|
||||||
throw runtime_error("-ac_cc < 2");
|
throw runtime_error("-ac_cc <= 1000");
|
||||||
|
|
||||||
if (ASSETCHAINS_SYMBOL[0] == 0)
|
if (ASSETCHAINS_SYMBOL[0] == 0)
|
||||||
throw runtime_error("Must be called on assetchain");
|
throw runtime_error("Must be called on assetchain");
|
||||||
|
|||||||
Reference in New Issue
Block a user