This PR adds test coverage for the following errors for the signrawtransactionwithkey
RPC:
- Invalid private key
- TX decode failed
For reference: https://maflcko.github.io/b-c-cov/total.coverage/src/rpc/rawtransaction.cpp.gcov.html
signrawtransactionwithkey
RPC
#30278
This PR adds test coverage for the following errors for the signrawtransactionwithkey
RPC:
For reference: https://maflcko.github.io/b-c-cov/total.coverage/src/rpc/rawtransaction.cpp.gcov.html
* Invalid private key
* TX decode failed
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For detailed information about the code coverage, see the test coverage report.
See the guideline for information on the review process.
Type | Reviewers |
---|---|
ACK | tdb3, maflcko, BrandonOdiwuor, kevkevinpal |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
125@@ -126,10 +126,20 @@ def invalid_sighashtype_test(self):
126 privkeys = [self.nodes[0].get_deterministic_priv_key().key]
127 assert_raises_rpc_error(-8, "'all' is not a valid sighash parameter.", self.nodes[0].signrawtransactionwithkey, tx, privkeys, sighashtype="all")
128
129+ def invalid_private_key_and_tx(self):
createrawtransaction
.
ACK e2779ce98b39e14cada08a654928e798436f5a46
Ran rpc_signrawtransactionwithkey
locally (passed). Intentionally caused test failure by 1) using privkey cUeKHd5orzT3mz8P9pxyREHfsWtVfgsfDjiZZBcjUBAaGk1BTj7N
and independently by 2) removing the trailing 00
from the tx. Test failed as expected each time.