Skip to content

Commit 8866284

Browse files
committed
[RPC][BUG] Fix 'mnfinalbudget show' returning a single budget
Because all of them have the same name (object key). Fix it by adding the nHash to the object key (removing it from the object value).
1 parent ddac6ce commit 8866284

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rpc/budget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,6 @@ UniValue mnfinalbudget(const JSONRPCRequest& request)
843843
const uint256& nHash = finalizedBudget->GetHash();
844844
UniValue bObj(UniValue::VOBJ);
845845
bObj.pushKV("FeeTX", finalizedBudget->GetFeeTXHash().ToString());
846-
bObj.pushKV("Hash", nHash.ToString());
847846
bObj.pushKV("BlockStart", (int64_t)finalizedBudget->GetBlockStart());
848847
bObj.pushKV("BlockEnd", (int64_t)finalizedBudget->GetBlockEnd());
849848
bObj.pushKV("Proposals", finalizedBudget->GetProposalsStr());
@@ -855,7 +854,8 @@ UniValue mnfinalbudget(const JSONRPCRequest& request)
855854
if (!fValid)
856855
bObj.pushKV("IsInvalidReason", finalizedBudget->IsInvalidReason());
857856

858-
resultObj.pushKV(finalizedBudget->GetName(), bObj);
857+
std::string strName = strprintf("%s (%s)", finalizedBudget->GetName(), nHash.ToString());
858+
resultObj.pushKV(strName, bObj);
859859
}
860860

861861
return resultObj;

0 commit comments

Comments
 (0)