Skip to content

Commit

Permalink
Merge pull request jl777#437 from VerusCoin/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Asherda authored Aug 24, 2022
2 parents 26898db + 782a4b5 commit d0f18ea
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1712,8 +1712,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
fReindex = true;
}

fInsightExplorer = GetBoolArg("-insightexplorer", DEFAULT_INSIGHTEXPLORER);
pblocktree->ReadFlag("insightexplorer", checkval);
fInsightExplorer = GetBoolArg("-insightexplorer", checkval);
if ( checkval != fInsightExplorer )
{
pblocktree->WriteFlag("insightexplorer", fInsightExplorer);
Expand Down Expand Up @@ -1788,7 +1788,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
}

// Check for changed -insightexplorer state
if (!fReindex && fInsightExplorer != GetBoolArg("-insightexplorer", DEFAULT_INSIGHTEXPLORER) ) {
pblocktree->ReadFlag("insightexplorer", fInsightExplorer);
if (!fReindex && fInsightExplorer != GetBoolArg("-insightexplorer", fInsightExplorer) ) {
strLoadError = _("You need to rebuild the database using -reindex to change -insightexplorer");
break;
}
Expand Down
1 change: 0 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7064,7 +7064,6 @@ bool static LoadBlockIndexDB()
{
fAddressIndex = fInsightExplorer;
fSpentIndex = fInsightExplorer;
fIdIndex = fInsightExplorer;
}
fTimestampIndex = fInsightExplorer;

Expand Down
1 change: 0 additions & 1 deletion src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ static const int64_t DEFAULT_MAX_TIP_AGE = 24 * 60 * 60;
//static const bool DEFAULT_SPENTINDEX = false;
#define DEFAULT_ADDRESSINDEX (GetArg("-ac_cc",0) != 0 || GetArg("-ac_ccactivate",0) != 0)
#define DEFAULT_SPENTINDEX (GetArg("-ac_cc",0) != 0 || GetArg("-ac_ccactivate",0) != 0)
static const bool DEFAULT_INSIGHTEXPLORER = true;
static const bool DEFAULT_TIMESTAMPINDEX = false;
static const unsigned int DEFAULT_DB_MAX_OPEN_FILES = 1000;
static const bool DEFAULT_DB_COMPRESSION = true;
Expand Down
6 changes: 3 additions & 3 deletions src/pbaas/pbaas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1883,7 +1883,6 @@ bool PrecheckCurrencyDefinition(const CTransaction &spendingTx, int32_t outNum,

bool isNFTMappedCurrency = systemDef.IsValid() &&
systemDef.IsGateway() &&
systemDef.proofProtocol == systemDef.PROOF_ETHNOTARIZATION &&
newCurrency.maxPreconvert.size() == 1 &&
newCurrency.maxPreconvert[0] == 0 &&
newCurrency.IsNFTToken() &&
Expand All @@ -1896,8 +1895,9 @@ bool PrecheckCurrencyDefinition(const CTransaction &spendingTx, int32_t outNum,
newCurrency.IsToken() &&
newCurrency.GetTotalPreallocation() == 1;

if (newCurrency.nativeCurrencyID.TypeNoFlags() == newCurrency.nativeCurrencyID.DEST_ETHNFT &&
!isNFTMappedCurrency)
if ((newCurrency.nativeCurrencyID.TypeNoFlags() == newCurrency.nativeCurrencyID.DEST_ETHNFT &&
!(systemDef.proofProtocol == systemDef.PROOF_ETHNOTARIZATION && isNFTMappedCurrency)) ||
(newCurrency.IsNFTToken() && !isNFTMappedCurrency))
{
return state.Error("Tokenized ID currency or NFT mapped currency must have only 1 satoshi of supply and follow all definition rules");
}
Expand Down

0 comments on commit d0f18ea

Please sign in to comment.