Skip to content

Commit a375586

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 4136d8f commit a375586

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
@@ -855,7 +855,6 @@ UniValue mnfinalbudget(const JSONRPCRequest& request)
855855
const uint256& nHash = finalizedBudget->GetHash();
856856
UniValue bObj(UniValue::VOBJ);
857857
bObj.pushKV("FeeTX", finalizedBudget->GetFeeTXHash().ToString());
858-
bObj.pushKV("Hash", nHash.ToString());
859858
bObj.pushKV("BlockStart", (int64_t)finalizedBudget->GetBlockStart());
860859
bObj.pushKV("BlockEnd", (int64_t)finalizedBudget->GetBlockEnd());
861860
bObj.pushKV("Proposals", finalizedBudget->GetProposalsStr());
@@ -867,7 +866,8 @@ UniValue mnfinalbudget(const JSONRPCRequest& request)
867866
if (!fValid)
868867
bObj.pushKV("IsInvalidReason", finalizedBudget->IsInvalidReason());
869868

870-
resultObj.pushKV(finalizedBudget->GetName(), bObj);
869+
std::string strName = strprintf("%s (%s)", finalizedBudget->GetName(), nHash.ToString());
870+
resultObj.pushKV(strName, bObj);
871871
}
872872

873873
return resultObj;

0 commit comments

Comments
 (0)