]> Git Repo - VerusCoin.git/commitdiff
Fix getsaplingtree API
authormiketout <[email protected]>
Tue, 19 May 2020 01:52:01 +0000 (18:52 -0700)
committermiketout <[email protected]>
Tue, 19 May 2020 01:52:01 +0000 (18:52 -0700)
src/rpc/pbaasrpc.cpp

index 391b5f1bc62acdff33b64995c7928a4363e2de52..9bc8d6f0c9f8bfcaaaee8c86cc543d639b670ade 100644 (file)
@@ -4322,7 +4322,7 @@ UniValue getsaplingtree(const UniValue& params, bool fHelp)
     for (int i = start; i <= end; i += step)
     {
         CBlockIndex &blkIndex = *(chainActive[i]);
-        if (!view.GetSaplingAnchorAt(blkIndex.hashFinalSaplingRoot, tree))
+        if (view.GetSaplingAnchorAt(blkIndex.hashFinalSaplingRoot, tree))
         {
             UniValue entry(UniValue::VOBJ);
             entry.push_back(Pair("network", ConnectedChains.ThisChain().name));
@@ -4330,7 +4330,7 @@ UniValue getsaplingtree(const UniValue& params, bool fHelp)
             entry.push_back(Pair("hash", blkIndex.GetBlockHash().GetHex()));
             entry.push_back(Pair("time", (uint64_t)chainActive.LastTip()->nTime));
             std::vector<unsigned char> treeBytes = ::AsVector(tree);
-            entry.push_back(Pair("currencystate", HexBytes(treeBytes.data(), treeBytes.size())));
+            entry.push_back(Pair("tree", HexBytes(treeBytes.data(), treeBytes.size())));
             ret.push_back(entry);
         }
     }
This page took 0.035591 seconds and 4 git commands to generate.