Skip to content

Commit

Permalink
Merge pull request #522 from VerusCoin/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Asherda committed Jun 9, 2023
2 parents 8ed3432 + 9051936 commit 4beede9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pbaas/crosschainrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extern std::string VERUS_CHAINNAME;

uint32_t PBAAS_TESTFORK2_TIME = 1684281600;
uint32_t PBAAS_TESTFORK3_TIME = 1685379600;
uint32_t PBAAS_TESTFORK4_TIME = 1686330000;
uint32_t PBAAS_TESTFORK4_TIME = 1686416400;
uint32_t PBAAS_MAINDEFI3_HEIGHT = 2553500;
uint32_t PBAAS_ENFORCE_CORRECT_EVIDENCE_TIME = 1684359650;

Expand Down
8 changes: 8 additions & 0 deletions src/pbaas/notarization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,14 @@ bool CPBaaSNotarization::NextNotarizationInfo(const CCurrencyDefinition &sourceS
newNotarization.SetLaunchCleared();
newNotarization.currencyState.SetLaunchClear();

forcedRefund = (destCurrency.IsFractional() &&
PBAAS_TESTMODE &&
destSystemID == VERUS_CHAINID &&
lastExportHeight < ConnectedChains.GetZeroViaHeight(true) &&
GetTime() > PBAAS_TESTFORK4_TIME &&
newPreConversionReservesIn.valueMap[destSystemID] &&
!newNotarization.currencyState.reserves[newNotarization.currencyState.GetReserveMap()[destSystemID]]);

// if we are connected to another currency, make sure it will also start before we confirm that we can
CCurrencyDefinition coLaunchCurrency;
CCoinbaseCurrencyState coLaunchState;
Expand Down
3 changes: 2 additions & 1 deletion src/pbaas/pbaas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4684,6 +4684,7 @@ bool PrecheckReserveTransfer(const CTransaction &tx, int32_t outNum, CValidation
}
else if (haveFullChain &&
ConnectedChains.CheckZeroViaOnlyPostLaunch(height) &&
(!PBAAS_TESTMODE || chainActive[height - 1]->nTime >= PBAAS_TESTFORK4_TIME) &&
!importState.IsLaunchCompleteMarker())
{
if (rt.IsCurrencyExport() ||
Expand Down Expand Up @@ -5915,7 +5916,7 @@ bool CConnectedChains::IsUpgradeActive(const uint160 &upgradeID, uint32_t blockH

uint32_t CConnectedChains::GetZeroViaHeight(bool getVerusHeight) const
{
return (getVerusHeight || IsVerusActive()) ? (PBAAS_TESTMODE ? 67631 : 2577258) : 0;
return (getVerusHeight || IsVerusActive()) ? (PBAAS_TESTMODE ? 69013 : 2578653) : 0;
}

bool CConnectedChains::CheckZeroViaOnlyPostLaunch(uint32_t height) const
Expand Down

0 comments on commit 4beede9

Please sign in to comment.