-
Notifications
You must be signed in to change notification settings - Fork 38.7k
RPC: gettxout: Slightly improve doc and tests #10859
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
Conversation
src/rpc/blockchain.cpp
Outdated
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.
Wow, such meme, many pool.
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.
hahaha, yeah let's leave a memepool structure for another PR. fixed
2bf90e1 to
7ec3689
Compare
|
btw, hopefully the nit was solved |
|
utACK 7ec368927480c809d27de186690f9d6b6c2e9a9f |
test/functional/wallet.py
Outdated
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.
mempool
|
utACK 7ec368927480c809d27de186690f9d6b6c2e9a9f after fixup |
7ec3689 to
6d2d2eb
Compare
|
Fixed @MarcoFalke 's nit |
6d2d2eb RPC: gettxout: Slightly improve doc and tests (Jorge Timón) Pull request description: Slightly related to #10822 in the sense that I felt the documentation and testing wasn't as good as it could be while writing it. Ping @sipa since we discussed this on IRC. Tree-SHA512: a0b3ffdac65245a0429e772fc2d8bcc1e829b02c70fb2af6ee0b7578cae46683f6c51a824b4d703d4dc3f99b6f03a658d6bbc818bf32981516f24124249a211d
| assert_equal(txout['value'], 50) | ||
| txout = self.nodes[0].gettxout(txid=confirmed_txid, n=confirmed_index, include_mempool=True) | ||
| assert_equal(txout['value'], 50) | ||
|
|
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.
nit: There is trailing whitespace, causing issues with some editors. We don't have this rule in the developer notes, but good to keep in mind for the future.
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.
Perhaps it is time to add it to the notes. Is is save right now to have your editor configured to remove all trailing whitespaces in any file you save in the project now?
I remember when that wouldn't be save in the sense that your +14-5 commit would turn into +60-50 or something.
|
re-utACK 6d2d2eb |
| self.log.info("test gettxout") | ||
| confirmed_txid, confirmed_index = utxos[0]["txid"], utxos[0]["vout"] | ||
| # First, outputs that are unspent both in the chain and in the | ||
| # mempool should appear with or without include_mempool |
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.
Nit, missing period.
| "2. n (numeric, required) vout number\n" | ||
| "3. include_mempool (boolean, optional) Whether to include the mempool\n" | ||
| "1. \"txid\" (string, required) The transaction id\n" | ||
| "2. \"n\" (numeric, required) vout number\n" |
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.
Nit, vout index?
| "1. \"txid\" (string, required) The transaction id\n" | ||
| "2. \"n\" (numeric, required) vout number\n" | ||
| "3. \"include_mempool\" (boolean, optional) Whether to include the mempool. Default: true." | ||
| " Note that an unspent output that is spent in the mempool won't appear.\n" |
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.
Mixed feelings when reading the note, I thought an unspent output is never spent weather the transaction is in the mempool or not, otherwise is not an unspent output.
Suggestion, remove unspent: Note that an output that is spent in the mempool isn't listed.
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.
@MarcoFalke it's merged but WDYT?
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.
"unspent output" refers to the chainstate, whereas "spent in the mempool" has no effect on the chainstate. Imo it is fine.
Github-Pull: bitcoin#10859 Rebased-From: 6d2d2eb
6d2d2eb RPC: gettxout: Slightly improve doc and tests (Jorge Timón) Pull request description: Slightly related to bitcoin#10822 in the sense that I felt the documentation and testing wasn't as good as it could be while writing it. Ping @sipa since we discussed this on IRC. Tree-SHA512: a0b3ffdac65245a0429e772fc2d8bcc1e829b02c70fb2af6ee0b7578cae46683f6c51a824b4d703d4dc3f99b6f03a658d6bbc818bf32981516f24124249a211d
Slightly related to #10822 in the sense that I felt the documentation and testing wasn't as good as it could be while writing it.
Ping @sipa since we discussed this on IRC.