From 1c20160933325d3953bb9782bcd8efa624b28202 Mon Sep 17 00:00:00 2001 From: konez2k <32417933+konez2k@users.noreply.github.com> Date: Mon, 11 May 2020 14:37:14 +0200 Subject: [PATCH] Fix `gobject submit`: replace request params with txidFee (#3471) Replaced request.params[5] with txidFee, cause the param could be null at that index when the submit type is a masternode trigger, triggering a JSON parsing error (expected str, got null). --- src/rpc/governance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/governance.cpp b/src/rpc/governance.cpp index b666cfcf6a..1423b75324 100644 --- a/src/rpc/governance.cpp +++ b/src/rpc/governance.cpp @@ -285,7 +285,7 @@ UniValue gobject_submit(const JSONRPCRequest& request) CGovernanceObject govobj(hashParent, nRevision, nTime, txidFee, strDataHex); LogPrint(BCLog::GOBJECT, "gobject_submit -- GetDataAsPlainString = %s, hash = %s, txid = %s\n", - govobj.GetDataAsPlainString(), govobj.GetHash().ToString(), request.params[5].get_str()); + govobj.GetDataAsPlainString(), govobj.GetHash().ToString(), txidFee.ToString()); if (govobj.GetObjectType() == GOVERNANCE_OBJECT_PROPOSAL) { CProposalValidator validator(strDataHex, false);