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).
This commit is contained in:
konez2k 2020-05-11 14:37:14 +02:00 committed by GitHub
parent 970c23d6e6
commit 1c20160933
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -285,7 +285,7 @@ UniValue gobject_submit(const JSONRPCRequest& request)
CGovernanceObject govobj(hashParent, nRevision, nTime, txidFee, strDataHex); CGovernanceObject govobj(hashParent, nRevision, nTime, txidFee, strDataHex);
LogPrint(BCLog::GOBJECT, "gobject_submit -- GetDataAsPlainString = %s, hash = %s, txid = %s\n", 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) { if (govobj.GetObjectType() == GOVERNANCE_OBJECT_PROPOSAL) {
CProposalValidator validator(strDataHex, false); CProposalValidator validator(strDataHex, false);