vout parameter in createrawtransaction could be missing or non-num,
but the code simply check the type of vout and throws missing error, which is
not right for string vout.
Details
- Reviewers
jasonbcox schancel - Group Reviewers
Restricted Project Restricted Owners Package (Owns No Changed Paths) - Commits
- rSTAGING7e6d3e27bea9: vout parameter check in createrawtransaction is confused with missing &…
rABC7e6d3e27bea9: vout parameter check in createrawtransaction is confused with missing &…
make check
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- fix/createrawtransaction_param_vout_check
- Lint
Lint Passed Severity Location Code Message Auto-Fix src/rpc/rawtransaction.cpp:1 CFMT Code style violation - Unit
No Test Coverage - Build Status
Buildable 2849 Build 3802: Bitcoin ABC Buildbot (legacy) Build 3801: arc lint + arc unit
Event Timeline
make check is not an appropriate test for this. This is changing behavior, and such behavior needs to be tested. Please update the test plan accordingly.
Except this, LGTM.
Amaury is saying you need to add this to the test plan, at a minimum:
/test/functional/test_runner.py rawtransactions.py
This ensures you test changes pass locally before publishing the diff. :)
OK, thanks, I had test it locally and it's OK, I will update it to the commit. The code format lint is quite hard to fix, any suggestion?
Seems like a good change. However, please fix the code style as per what I suggested. Just check for null first.
src/rpc/rawtransaction.cpp | ||
---|---|---|
510 ↗ | (On Diff #4283) | Please make this two ifs. rather than an or and an internal branch (via ternary operator) |
src/rpc/rawtransaction.cpp | ||
---|---|---|
510 ↗ | (On Diff #4283) | The first version I made is 2 ifs, but the code format said the new if is coped from line 512: Then I turn the 2 ifs into one to avoid the coding style warning, I think 2ifs is more easy to read, but make the 2ifs into 1 is acceptable too, what do you think? |
sometimes bip68-sequence.py test will fail which I think is irrelevant with this commit.