// get the latest notarization information for the new, earned notarization
// one system may provide one proof root and multiple currency states
CProofRoot latestProofRoot = CProofRoot(find_value(result, "latestproofroot"));
- if (!latestProofRoot.IsValid())
+ if (!latestProofRoot.IsValid() || notarization.proofRoots[latestProofRoot.systemID].rootHeight >= latestProofRoot.rootHeight)
{
- return state.Error("no-latest-proof-root");
+ return state.Error("no-new-latest-proof-root");
}
notarization.proofRoots[latestProofRoot.systemID] = latestProofRoot;
notarization.notarizationHeight = latestProofRoot.rootHeight;
0,
systemDestID,
0,
- systemDestID,
+ importCurrencyID,
CTransferDestination());
}
else if (importCurrencyState.IsRefunding() || (exportObjects[i].IsPreConversion() && importCurrencyState.IsLaunchCompleteMarker()))
}
if (((importCurrencyID != curTransfer.FirstCurrency()) && (curTransfer.flags & curTransfer.IMPORT_TO_SOURCE)) ||
- ((importCurrencyID == curTransfer.FirstCurrency()) && !((curTransfer.flags & curTransfer.IMPORT_TO_SOURCE))))
+ ((importCurrencyID != curTransfer.destCurrencyID) && !((curTransfer.flags & curTransfer.IMPORT_TO_SOURCE))))
{
- printf("%s: Importing to source currency without flag or importing to destination with source flag\n", __func__);
+ printf("%s: Importing to source currency w/o flag or importing to destination w/source flag:\n%s\n", __func__, curTransfer.ToUniValue().write(1,2).c_str());
LogPrintf("%s: Importing to source currency without flag or importing to destination with source flag\n", __func__);
return false;
}