Ignore the contents of SigningPubKey when multisigning with a target

This commit is contained in:
Ed Hennis
2025-10-28 18:31:31 -04:00
parent 122d8f96b3
commit 0febc60cbe

View File

@@ -1097,7 +1097,11 @@ checkMultiSignFields(Json::Value const& jvRequest)
if (!tx_json.isMember(sfSigningPubKey.getJsonName()))
return RPC::missing_field_error("tx_json.SigningPubKey");
if (!tx_json[sfSigningPubKey.getJsonName()].asString().empty())
// Multi-signing into a signature_target object field is fine,
// because it means the signature is not for the transaction
// Account.
if (!jvRequest.isMember(jss::signature_target) &&
!tx_json[sfSigningPubKey.getJsonName()].asString().empty())
return RPC::make_error(
rpcINVALID_PARAMS,
"When multi-signing 'tx_json.SigningPubKey' must be empty.");