test: Add gettransaction test for “coin-join” tx #18919
pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2005-testCoinJoinGetTx changing 1 files +29 −0-
maflcko commented at 11:13 pm on May 8, 2020: member
-
fanquake added the label Tests on May 8, 2020
-
in test/functional/wallet_listtransactions.py:236 in fa592dc59b outdated
231+ ) 232+ raw_hex = self.nodes[0].signrawtransactionwithwallet(raw_hex)['hex'] 233+ raw_hex = self.nodes[1].signrawtransactionwithwallet(raw_hex)['hex'] 234+ txid_join = self.nodes[0].sendrawtransaction(hexstring=raw_hex, maxfeerate=0) 235+ fee_join = self.nodes[0].getmempoolentry(txid_join)['fees']['base'] 236+ #assert_equal(fee_join, self.nodes[0].gettransaction(txid_join)['fee'])
instagibbs commented at 6:35 pm on May 9, 2020:hm?
maflcko commented at 6:39 pm on May 9, 2020:That’s the bug. the#
can be removed when the bug is fixed
maflcko commented at 12:10 pm on December 24, 2021:Thanks, fixed comment to clarifyluke-jr commented at 6:40 pm on June 2, 2020: memberWe would need major enhancements to support CoinJoin transactions. It’s a lot more involved than just showing the correct “fee” (which this test would not check correctly anyway - some of the fee may be going to a CJ peer instead of the miner).maflcko commented at 7:19 pm on June 2, 2020: member@luke-jr If this is unsupported, it should be documented as unsupported. See also my reply here: #19002 (comment)luke-jr commented at 8:21 pm on June 2, 2020: memberShould we document every other thing that isn’t supported too?
Unsupported is the default…
DrahtBot commented at 9:20 pm on November 10, 2020: contributorThe following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Code Coverage
For detailed information about the code coverage, see the test coverage report.
Reviews
See the guideline for information on the review process.
Type Reviewers ACK furszy Concept ACK ismaelsadeeq If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Conflicts
No conflicts as of last run.
DrahtBot added the label Needs rebase on Jun 24, 2021maflcko force-pushed on Dec 24, 2021DrahtBot removed the label Needs rebase on Dec 24, 2021fanquake requested review from instagibbs on May 6, 2022fanquake requested review from jonatack on May 6, 2022in test/functional/wallet_listtransactions.py:306 in faf2d7dbb7 outdated
301+ raw_hex = self.nodes[0].signrawtransactionwithwallet(raw_hex)["hex"] 302+ raw_hex = self.nodes[1].signrawtransactionwithwallet(raw_hex)["hex"] 303+ txid_join = self.nodes[0].sendrawtransaction(hexstring=raw_hex, maxfeerate=0) 304+ fee_join = self.nodes[0].getmempoolentry(txid_join)["fees"]["base"] 305+ # Fee should be correct: assert_equal(fee_join, self.nodes[0].gettransaction(txid_join)['fee']) 306+ # But it is not:
instagibbs commented at 1:39 pm on May 6, 2022:link the issue directly here so someone can follow-up with the rebased fix?
maflcko commented at 10:24 am on May 9, 2022:Thanks, donemaflcko force-pushed on May 9, 2022fanquake requested review from instagibbs on May 9, 2022in test/functional/wallet_listtransactions.py:311 in fad82aef05 outdated
302+ raw_hex = self.nodes[1].signrawtransactionwithwallet(raw_hex)["hex"] 303+ txid_join = self.nodes[0].sendrawtransaction(hexstring=raw_hex, maxfeerate=0) 304+ fee_join = self.nodes[0].getmempoolentry(txid_join)["fees"]["base"] 305+ # Fee should be correct: assert_equal(fee_join, self.nodes[0].gettransaction(txid_join)['fee']) 306+ # But it is not, see for example https://github.com/bitcoin/bitcoin/issues/14136: 307+ assert fee_join != self.nodes[0].gettransaction(txid_join)["fee"]
kouloumos commented at 11:20 am on June 2, 2022:As this tests confirms that a bug still exists for thegettransaction
rpc call, would it make sense to further document the issue by adding another assertion fromnodes[1]
perspective? Because in the case that inputs are not the same, the resulting fee fromgettransaction
is different based on which side called the RPC.
maflcko commented at 6:09 am on June 10, 2022:I think the test as-is now is sufficientismaelsadeeq commented at 4:51 pm on March 14, 2023: membert(ACK) , I recreate and the bug exist also no need to add the node[1]’s perspective, I have tested and it’s all the same for both nodes.maflcko force-pushed on Aug 23, 2023maflcko force-pushed on Sep 14, 2023maflcko commented at 5:28 am on September 15, 2023: memberrebasedtest: Add gettransaction test for "coin-join" tx fa20f8919cmaflcko force-pushed on Nov 23, 2023fanquake requested review from furszy on Nov 23, 2023in test/functional/wallet_listtransactions.py:309 in fa20f8919c
304+ ) 305+ raw_hex = self.nodes[0].signrawtransactionwithwallet(raw_hex)["hex"] 306+ raw_hex = self.nodes[1].signrawtransactionwithwallet(raw_hex)["hex"] 307+ txid_join = self.nodes[0].sendrawtransaction(hexstring=raw_hex, maxfeerate=0) 308+ fee_join = self.nodes[0].getmempoolentry(txid_join)["fees"]["base"] 309+ # Fee should be correct: assert_equal(fee_join, self.nodes[0].gettransaction(txid_join)['fee'])
furszy commented at 2:14 pm on November 23, 2023:Could we add a “todo:” at the beginning? Just to make it easier to find broken things in the future.
maflcko commented at 2:28 pm on November 23, 2023:I am not a fan of TODO comments, because I think issues in the issue tracker are a better way to track outstanding feature requests and bugfixes. An issue allows anyone to leave new context, ask questions, or look up the full discussion history on the topic.
So going to leave as-is for now.
furszy commented at 2:15 pm on November 23, 2023: memberutACK fa20f8919c4fDrahtBot requested review from ismaelsadeeq on Nov 23, 2023fanquake merged this on Nov 23, 2023fanquake closed this on Nov 23, 2023
maflcko deleted the branch on Nov 24, 2023
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-23 15:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me