Skip to content

Commit

Permalink
Merge pull request jl777#361 from VerusCoin/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Asherda authored Oct 21, 2021
2 parents 6d4c4cf + f156855 commit f5955c7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
5 changes: 5 additions & 0 deletions src/pbaas/pbaas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,11 @@ bool ValidateReserveDeposit(struct CCcontract_info *cp, Eval* eval, const CTrans
std::vector<CTxOut> vOutputs;
CCurrencyValueMap importedCurrency, gatewayCurrencyUsed, spentCurrencyOut;

if (ccxSource.IsClearLaunch())
{
checkState.SetLaunchCompleteMarker(false);
}

if (!rtxd.AddReserveTransferImportOutputs(sourceSysDef,
destSysDef,
destCurDef,
Expand Down
32 changes: 14 additions & 18 deletions src/pbaas/reserves.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,25 +199,16 @@ bool CCrossChainExport::GetExportInfo(const CTransaction &exportTx,
hw << oneRt;
reserveTransfers.push_back(oneRt);
}
if (rtExport.HasSupplement() ||
(!rtExport.IsSameChain() && rtExport.numInputs > 0))
{
numOutput++;
if (!(exportTx.vout.size() > numOutput &&
exportTx.vout[numOutput].scriptPubKey.IsPayToCryptoCondition(p) &&
p.IsValid() &&
p.evalCode == EVAL_CROSSCHAIN_EXPORT &&
p.vData.size() &&
(rtExport = CCrossChainExport(p.vData[0])).IsValid() &&
rtExport.IsSupplemental()))
{
numOutput--;
rtExport = CCrossChainExport();
}
}
else
numOutput++;
if (!(exportTx.vout.size() > numOutput &&
exportTx.vout[numOutput].scriptPubKey.IsPayToCryptoCondition(p) &&
p.IsValid() &&
p.evalCode == EVAL_CROSSCHAIN_EXPORT &&
p.vData.size() &&
(rtExport = CCrossChainExport(p.vData[0])).IsValid() &&
rtExport.IsSupplemental()))
{
// no more supplements, done
numOutput--;
rtExport = CCrossChainExport();
}
}
Expand Down Expand Up @@ -1814,6 +1805,11 @@ CReserveTransactionDescriptor::CReserveTransactionDescriptor(const CTransaction
}*/

CReserveTransactionDescriptor rtxd;
// if clear launch, don't set launch complete beforehand to match outputs
if (ccx.IsClearLaunch())
{
checkState.SetLaunchCompleteMarker(false);
}
if (!rtxd.AddReserveTransferImportOutputs(sourceSystemDef,
ConnectedChains.thisChain,
importCurrencyDef,
Expand Down

0 comments on commit f5955c7

Please sign in to comment.