test: Run invalid_txs.InputMissing test in feature_block #15102
pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1901-testInputMissing changing 2 files +19 −10-
MarcoFalke commented at 12:44 pm on January 4, 2019: member
-
fanquake added the label Tests on Jan 4, 2019
-
in test/functional/feature_block.py:150 in fa73d4005a outdated
152 badtx = template.get_tx() 153- self.sign_tx(badtx, attempt_spend_tx) 154+ if TxTemplate != invalid_txs.InputMissing: 155+ self.sign_tx(badtx, attempt_spend_tx) 156+ else: 157+ # Segwit is active in regtest at this point, so to deserialze a
promag commented at 12:52 pm on January 4, 2019:typo “deserialze”.in test/functional/feature_block.py:156 in fa73d4005a outdated
158+ # transaction without any inputs correctly, we set the outputs 159+ # to an empty list. This is a hack, as the serialization of an 160+ # empty list of outputs is deserialized as flags==0 and thus 161+ # deserialization of the outputs is skipped. 162+ # Though, it works for the purpose that both sides calculate the 163+ # same tx hash in the merkle tree
ryanofsky commented at 4:50 pm on January 4, 2019:Not familiar with this test, but just reading the comment, it makes me wonder what outputs were previously inbadtx.vout
, and why they were generated to begin with if they can be discarded here. If it would make the hack slightly less hacky to avoid generating the outputs originally, or if there is a reason outputs just aren’t important, it would be nice to state this in the comment.ryanofsky approvedryanofsky commented at 4:53 pm on January 4, 2019: memberutACK faccf2b098b5c3ed76e4aa8c2161f84b68a8086a. This fixes lint warning, enables a disabled test, and solves an ancient mystery from feature_block test comments.jamesob approvedjamesob commented at 6:13 pm on January 4, 2019: membertest: Run invalid_txs.InputMissing test in feature_block fac4e731a8in test/functional/feature_block.py:150 in faccf2b098 outdated
152 badtx = template.get_tx() 153- self.sign_tx(badtx, attempt_spend_tx) 154+ if TxTemplate != invalid_txs.InputMissing: 155+ self.sign_tx(badtx, attempt_spend_tx) 156+ else: 157+ # Segwit is active in regtest at this point, so to deserialize a
practicalswift commented at 9:54 am on January 5, 2019:Indentation is not a multiple of four here :-)
MarcoFalke commented at 1:52 pm on January 5, 2019:DoneMarcoFalke force-pushed on Jan 5, 2019fanquake approvedfanquake commented at 2:10 pm on January 5, 2019: memberutACK fac4e73Empact commented at 2:42 am on January 7, 2019: memberMarcoFalke merged this on Jan 7, 2019MarcoFalke closed this on Jan 7, 2019
MarcoFalke referenced this in commit 295a1ad522 on Jan 7, 2019MarcoFalke deleted the branch on Jan 7, 2019jasonbcox referenced this in commit 6d889411ee on Sep 2, 2020Munkybooty referenced this in commit 24694beb11 on Aug 20, 2021Munkybooty referenced this in commit 034216ab27 on Aug 21, 2021Munkybooty referenced this in commit a538b3ecc1 on Aug 23, 2021Munkybooty referenced this in commit 31bc9ab19b on Aug 24, 2021Munkybooty referenced this in commit bb257c6c42 on Aug 24, 2021Munkybooty referenced this in commit daa7d2f140 on Sep 5, 2021DrahtBot locked this on Dec 16, 2021
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-17 12:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me