Skip to content

Conversation

@jtimon
Copy link
Contributor

@jtimon jtimon commented Jul 18, 2017

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.

Copy link
Member

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.

Copy link
Contributor Author

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

@jtimon jtimon force-pushed the b15-rpc-gettxout-mempool branch from 2bf90e1 to 7ec3689 Compare July 18, 2017 00:51
@jtimon
Copy link
Contributor Author

jtimon commented Aug 26, 2017

btw, hopefully the nit was solved

@sipa
Copy link
Member

sipa commented Aug 27, 2017

utACK 7ec368927480c809d27de186690f9d6b6c2e9a9f

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mempool

@maflcko
Copy link
Member

maflcko commented Aug 27, 2017

utACK 7ec368927480c809d27de186690f9d6b6c2e9a9f after fixup

@jtimon jtimon force-pushed the b15-rpc-gettxout-mempool branch from 7ec3689 to 6d2d2eb Compare August 28, 2017 22:58
@jtimon
Copy link
Contributor Author

jtimon commented Aug 28, 2017

Fixed @MarcoFalke 's nit

@maflcko maflcko merged commit 6d2d2eb into bitcoin:master Aug 28, 2017
maflcko pushed a commit that referenced this pull request Aug 28, 2017
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)

Copy link
Member

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.

Copy link
Contributor Author

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.

@maflcko
Copy link
Member

maflcko commented Aug 28, 2017

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
Copy link
Contributor

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"
Copy link
Contributor

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"
Copy link
Contributor

@promag promag Aug 29, 2017

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.

Copy link
Contributor

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?

Copy link
Member

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.

@jtimon jtimon deleted the b15-rpc-gettxout-mempool branch August 31, 2017 22:00
maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Oct 3, 2017
codablock pushed a commit to codablock/dash that referenced this pull request Sep 24, 2019
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
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants