Adds an example where the heuristic fails
test: Check that decoderawtransaction heuristic may fail #19831
pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2008-testDecodeRawT changing 1 files +6 −2-
MarcoFalke commented at 1:54 PM on August 29, 2020: member
- DrahtBot added the label Tests on Aug 29, 2020
-
robot-dreams commented at 7:17 AM on September 1, 2020: contributor
Concept ACK
Would it make sense to be more explicit about what could go wrong (since it'll always be the case that the heuristic matches either
iswitness=Falseoriswitness=True)?For example:
# The heuristic produces an absurd result with a negative output value heuristic = self.nodes[0].decoderawtransaction(hexstring=TX_HEURISTIC) assert heuristic['vout'][0]['value'] < 0 # The heuristic produces the same absurd result as iswitness=False non_witness = self.nodes[0].decoderawtransaction(hexstring=TX_HEURISTIC, iswitness=False) assert_equal(heuristic['txid'], non_witness['txid']) # Specifying iswitness=True produces a reasonable result witness = self.nodes[0].decoderawtransaction(hexstring=TX_HEURISTIC, iswitness=True) assert witness['vout'][0]['value'] > 0 - MarcoFalke force-pushed on Oct 13, 2020
-
MarcoFalke commented at 12:19 PM on October 13, 2020: member
`assert heuristic['vout'][0]['value'] < 0`The amount doesn't have to be negative. I've modified the tx, so that the amount is positive.
-
laanwj commented at 3:31 PM on November 23, 2020: member
I'm a bit confused by this. Is this something that should be able to fail, or a bug that needs to be corrected in the heuristic?
-
DrahtBot commented at 12:51 PM on January 9, 2021: member
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #22437 (test, refactor: add GetTransaction() coverage, improve rpc_rawtransaction by jonatack)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
-
adamjonas commented at 5:56 PM on July 19, 2021: member
@MarcoFalke mind addressing laanwj's question?
- DrahtBot added the label Needs rebase on Sep 1, 2021
-
DrahtBot commented at 5:50 PM on September 1, 2021: member
<!--cf906140f33d8803c4a75a2196329ecb-->
🐙 This pull request conflicts with the target branch and needs rebase.
<sub>Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".</sub>
-
DrahtBot commented at 12:29 PM on December 22, 2021: member
<!--13523179cfe9479db18ec6c5d236f789-->There hasn't been much activity lately and the patch still needs rebase. What is the status here?
- Is it still relevant? ➡️ Please solve the conflicts to make it ready for review and to ensure the CI passes.
- Is it no longer relevant? ➡️ Please close.
- Did the author lose interest or time to work on this? ➡️ Please close it and mark it 'Up for grabs' with the label, so that it can be picked up in the future.
-
test: Check that decoderawtransaction heuristic may fail 57c0363223
- MarcoFalke force-pushed on Dec 24, 2021
-
MarcoFalke commented at 12:45 PM on December 24, 2021: member
Fixed by #20595
- MarcoFalke closed this on Dec 24, 2021
- MarcoFalke deleted the branch on Dec 24, 2021
- DrahtBot locked this on Dec 24, 2022