Skip to content

Commit

Permalink
Merge #6041: fix: adjust signrawtransactionwithkey help text
Browse files Browse the repository at this point in the history
238978e fix: adjust `signrawtransactionwithkey` help text (UdjinM6)

Pull request description:

  ## Issue being fixed or feature implemented
  `amount` was introduced in #3101. Double checked the code and yes, we do pass it around (for compatibility reasons) but it doesn’t affect the sig right now, you can set it to 0 or just skip it completely so it should be `optional`, not `required`. We even have a test that uses `signrawtransactionwithkey ` and ignores `amount` https://github.com/dashpay/dash/blob/master/test/functional/rpc_signrawtransaction.py#L19-L46.

  NOTE: It might become required for `sighashtype` with `SIGHASH_DIP0143` flag after #5860 activation.

  kudos to @pshenmic for noticing

  ## What was done?
  Adjust help text

  ## How Has This Been Tested?
  Run tests

  ## Breaking Changes
  n/a

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

Top commit has no ACKs.

Tree-SHA512: e028c46b8b9c1663d9940642b08d56444ab4e5ab33015af1cb99265338b75f9e1c156cbbdd8e00f313bce87117019c769241cc4d83ccd6693ec0ffbaa8940e89
  • Loading branch information
PastaPastaPasta committed Jun 3, 2024
2 parents 7596a73 + 238978e commit 5945c37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rpc/rawtransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ static RPCHelpMan signrawtransactionwithkey()
{"vout", RPCArg::Type::NUM, RPCArg::Optional::NO, "The output number"},
{"scriptPubKey", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "script key"},
{"redeemScript", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, "(required for P2SH or P2WSH) redeem script"},
{"amount", RPCArg::Type::AMOUNT, RPCArg::Optional::NO, "The amount spent"},
{"amount", RPCArg::Type::AMOUNT, RPCArg::Optional::OMITTED, "The amount spent"},
},
},
},
Expand Down

0 comments on commit 5945c37

Please sign in to comment.