]> Git Repo - VerusCoin.git/commitdiff
Notarization fix
authormiketout <[email protected]>
Sat, 1 May 2021 21:21:29 +0000 (14:21 -0700)
committermiketout <[email protected]>
Sat, 1 May 2021 21:21:29 +0000 (14:21 -0700)
src/pbaas/notarization.cpp
src/pbaas/reserves.cpp

index 6be9ecba856a183b348315d5b93a69e72df638ee..f9e6921f84c32704f2d63be89569eb088eb86f90 100644 (file)
@@ -1235,9 +1235,9 @@ bool CPBaaSNotarization::CreateEarnedNotarization(const CRPCChainData &externalS
     // 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;
index 4f15e5dea3a28bac9f2c4c434cf90bf7a1ebd855..ad82c324ccb376c74635018344c68e0b22680633 100644 (file)
@@ -2145,7 +2145,7 @@ bool CReserveTransactionDescriptor::AddReserveTransferImportOutputs(const CCurre
                                            0,
                                            systemDestID,
                                            0,
-                                           systemDestID,
+                                           importCurrencyID,
                                            CTransferDestination());
         }
         else if (importCurrencyState.IsRefunding() || (exportObjects[i].IsPreConversion() && importCurrencyState.IsLaunchCompleteMarker()))
@@ -2158,9 +2158,9 @@ bool CReserveTransactionDescriptor::AddReserveTransferImportOutputs(const CCurre
         }
 
         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;
         }
This page took 0.032617 seconds and 4 git commands to generate.