-
Notifications
You must be signed in to change notification settings - Fork 36.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rpc: Improve invalid vout value rpc error message #19956
Conversation
cf6befe
to
9dce22b
Compare
Concept ACK -- "positive" means greater than zero by definition, so the error message was incorrect I think you should squash those commits. Welcome as new contributor by the way! 🎉 |
19b7996
to
89860a8
Compare
THANKS @theStack |
ACK 89860a8. Agree with the concept, changes are no-risk. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 89860a8 🆗
Concept ACK -- This error also appears some other places. Here are the first two I found from Lines 599 to 600 in d052f5e
bitcoin/src/rpc/rawtransaction_util.cpp Lines 177 to 179 in ffaac6e
|
89860a8
to
4be8380
Compare
Addressed. @adaminsky |
ACK 4be8380. |
Could be a scripted diff to show the replacement is complete? |
I was not familiar with scripted diff, I will replace my commit with with script diff enabled. @MarcoFalke |
ea57639
to
f56bff4
Compare
Please insert an empty line in your commit message between the title of the commit and the body, otherwise it appears like this in one-line summary format:
The change itself looks good to me. |
f56bff4
to
43bfec8
Compare
Addressed @laanwj |
Instead of hardcoding the file names, you can use |
43bfec8
to
f471a3b
Compare
Yes, much better now. Thanks for the suggestoin @MarcoFalke |
-BEGIN VERIFY SCRIPT- r() { sed -i 's/vout must be positive/vout cannot be negative/g' $1 } r $(git grep -l 'vout must be positive') -END VERIFY SCRIPT-
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review ACK f471a3b.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK f471a3b
Summary: Since the vout value can start at 0, the error message for negative values can be improved to something like: vout cannot be negative. This is a backport of [[bitcoin/bitcoin#19956 | core#19956]] Test Plan: `ninja all check-all` Reviewers: #bitcoin_abc, majcosta Reviewed By: #bitcoin_abc, majcosta Differential Revision: https://reviews.bitcoinabc.org/D10423
f471a3b scripted diff: Improve invalid vout value rpc error message (Nima Yazdanmehr) Pull request description: Since the `vout` value can start at `0`, the error message for *negative* values can be improved to something like: `vout cannot be negative`. ACKs for top commit: fanquake: ACK f471a3b promag: Code review ACK f471a3b. Tree-SHA512: fbdee3d0ddd5b58eb93934a1217b44e125a9ad39e672b1f35c7609c6c5fcf45ae1b731d3d6135b7225d98792dbfc34a50907b8c41274a5b029d7b5c59f886560
f471a3b scripted diff: Improve invalid vout value rpc error message (Nima Yazdanmehr) Pull request description: Since the `vout` value can start at `0`, the error message for *negative* values can be improved to something like: `vout cannot be negative`. ACKs for top commit: fanquake: ACK f471a3b promag: Code review ACK f471a3b. Tree-SHA512: fbdee3d0ddd5b58eb93934a1217b44e125a9ad39e672b1f35c7609c6c5fcf45ae1b731d3d6135b7225d98792dbfc34a50907b8c41274a5b029d7b5c59f886560
f471a3b scripted diff: Improve invalid vout value rpc error message (Nima Yazdanmehr) Pull request description: Since the `vout` value can start at `0`, the error message for *negative* values can be improved to something like: `vout cannot be negative`. ACKs for top commit: fanquake: ACK f471a3b promag: Code review ACK f471a3b. Tree-SHA512: fbdee3d0ddd5b58eb93934a1217b44e125a9ad39e672b1f35c7609c6c5fcf45ae1b731d3d6135b7225d98792dbfc34a50907b8c41274a5b029d7b5c59f886560
f471a3b scripted diff: Improve invalid vout value rpc error message (Nima Yazdanmehr) Pull request description: Since the `vout` value can start at `0`, the error message for *negative* values can be improved to something like: `vout cannot be negative`. ACKs for top commit: fanquake: ACK f471a3b promag: Code review ACK f471a3b. Tree-SHA512: fbdee3d0ddd5b58eb93934a1217b44e125a9ad39e672b1f35c7609c6c5fcf45ae1b731d3d6135b7225d98792dbfc34a50907b8c41274a5b029d7b5c59f886560
Since the
vout
value can start at0
, the error message for negative values can be improved to something like:vout cannot be negative
.