Skip to content

Commit

Permalink
Merge pull request jl777#386 from VerusCoin/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Asherda authored Mar 3, 2022
2 parents 08c0af2 + 0908aeb commit eb9b4fa
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/pbaas/pbaas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2061,6 +2061,18 @@ bool PrecheckReserveTransfer(const CTransaction &tx, int32_t outNum, CValidation
CCurrencyValueMap newPreConversionReservesIn = rt.TotalCurrencyOut();
CCurrencyValueMap feeConversionPrices;

if (importState.IsPrelaunch())
{
if (!(rt.IsPreConversion() && rt.IsConversion()))
{
return state.Error("Only preconversion transfers are valid during the prelaunch phase of a currency " + rt.ToUniValue().write(1,2));
}
if (rt.FeeCurrencyID() != systemDestID)
{
return state.Error("Preconversion transfers must use the native fee currency of the launching system " + rt.ToUniValue().write(1,2));
}
}

if (importCurrencyDef.IsFractional() && importState.IsLaunchConfirmed())
{
feeConversionPrices = importState.TargetConversionPrices(systemDestID);
Expand Down

0 comments on commit eb9b4fa

Please sign in to comment.