-
Notifications
You must be signed in to change notification settings - Fork 37.7k
doc: Fixup remove 'omitted...' doc for rpc getrawtransaction when verbose is 2 #26968
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
doc: Fixup remove 'omitted...' doc for rpc getrawtransaction when verbose is 2 #26968
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
src/rpc/rawtransaction.cpp
Outdated
{RPCResult::Type::NUM, "fee", /*optional=*/true, "transaction fee in " + CURRENCY_UNIT + ", omitted if block undo data is not available"}, | ||
{RPCResult::Type::NUM, "fee", "Transaction fee in " + CURRENCY_UNIT}, |
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.
The current wording and optionality seems to be correct to me, I think the fee is only included if undo data is present?
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.
The entire block is included only if undo data is present
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.
"fee" is not part of the "prevout" object, it is its own, top-level KV pair
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.
@dougEfresh this seems unaddressed?
src/rpc/rawtransaction.cpp
Outdated
{ | ||
{RPCResult::Type::ELISION, "", "Same output as verbosity = 1"}, | ||
{RPCResult::Type::OBJ, "prevout", /*optional=*/true, "Only if undo information is available)", | ||
{RPCResult::Type::OBJ, "prevout", "The previous transaction", |
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.
"prevout" refers to output, not a transaction. Also here, /*optional=*/true
and Only if undo information is available
seem correct to me, I'm open to adding a description of prevout being the previous output.
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.
@dougEfresh this seems unaddressed?
I agree with @stickies-v's comments here. We are not going to be returning those fields unless the undo data is available (for the previous coin), so I think the wording is correct as-is? |
Not sure if you're implying a NACK with this, but this wording (i.e. the one initially highlighted by MarcoFalke) is incorrect imo and should indeed be fixed by this PR. Concept ACK (so our beloved bot doesn't misinterpret me (edit: ugh, didn't work)) |
Right. Sorry I wasn't clear; I'm agreeing with you on both counts: 1 wording item to be changed (L216), 2 wording items correct as they are (L213 & L219). |
@dougEfresh are you going to followup here? |
up for grabs? |
@MarcoFalke on it. Just been super busy last few weeks. |
8fc0d08
to
47f1292
Compare
@stickies-v This better? |
47f1292
to
0404143
Compare
I've provided links [1, 2] in my previous comments to reference the code from which I've built my understanding about which fields are optional and which ones aren't. Are we disagreeing about behaviour? My understanding in short is: "vin" is always present for verbosity>=1, whereas "fee" and "prevout" are omitted if no block data. So to me it seems like the latest force push (0404143) removes the only change that actually had to be made and what's left is incorrect. I've committed the changes I think need to be made to stickies-v@3280c03 - feel free to use. |
0404143
to
3ecb945
Compare
@stickies-v I agree with your change, have pushed it to this PR. |
I think ci is failing because you didn't fully apply my commit: git diff 3280c03 3ecb945 -- src/rpc/rawtransaction.cppdiff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
index 21d49fda9..986e7c0cc 100644
--- a/src/rpc/rawtransaction.cpp
+++ b/src/rpc/rawtransaction.cpp
@@ -219,7 +219,7 @@ static RPCHelpMan getrawtransaction()
{RPCResult::Type::OBJ, "", "utxo being spent",
{
{RPCResult::Type::ELISION, "", "Same output as verbosity = 1"},
- {RPCResult::Type::OBJ, "prevout", /*optional=*/true, "The previous output, omitted if block undo data is not available",
+ {RPCResult::Type::OBJ, /*optional=*/true, "The previous output, omitted if block undo data is not available",
{
{RPCResult::Type::BOOL, "generated", "Coinbase or not"},
{RPCResult::Type::NUM, "height", "The height of the prevout"}, |
3ecb945
to
3e947d7
Compare
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 3e947d7
Note: I'm glad that this is now in good shape, but for full transparency: to me this was a very frustrating review process and even though I hold no personal grudges over it, this will likely affect my enthusiasm towards reviewing your future work and for that reason I want to be transparent and share my feedback with you. I spent a lot of time writing out my thoughts and reasoning with links etc across multiple reviews, and yet every additional force-push felt like a "throw something at the wall and see if it sticks" approach. I have no problem whatsoever with clarifying misunderstanding or disagreement, but that was not the case - my comments were largely just ignored/unanswered. For such a trivial change, I spent way too much review time hand-holding.
@stickies-v I felt the same as you. The time spent on such a trivial change was too much. My apologies for not being more thorough with communication when I had questions. I assumed too much without 1st getting clarification. There too many threads and thus communication was lost. Again, my apologies for not being more communicative. |
…wtransaction when verbose is 2 3e947d7 doc: remove 'omitted...' doc for rpc getrawtransaction when verbose is 2 (dougEfish) Pull request description: Remove optional rpc doc for getrawtransaction when verbose is 2 ACKs for top commit: stickies-v: ACK 3e947d7 Tree-SHA512: b9e970d6ef4a47ec7ca32f5ff1028cc901f1bfdc1571668208505d42f4160733530601b78e469de82a854d3b298a55a81d0a7916bc5db4a43ad6d6a299c55c9e
Remove optional rpc doc for getrawtransaction when verbose is 2