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
  1. MarcoFalke commented at 12:44 pm on January 4, 2019: member
  2. fanquake added the label Tests on Jan 4, 2019
  3. 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”.
  4. 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 in badtx.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.
  5. ryanofsky approved
  6. ryanofsky commented at 4:53 pm on January 4, 2019: member
    utACK faccf2b098b5c3ed76e4aa8c2161f84b68a8086a. This fixes lint warning, enables a disabled test, and solves an ancient mystery from feature_block test comments.
  7. jamesob approved
  8. test: Run invalid_txs.InputMissing test in feature_block fac4e731a8
  9. in 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:
    Done
  10. MarcoFalke force-pushed on Jan 5, 2019
  11. fanquake approved
  12. fanquake commented at 2:10 pm on January 5, 2019: member
    utACK fac4e73
  13. MarcoFalke merged this on Jan 7, 2019
  14. MarcoFalke closed this on Jan 7, 2019

  15. MarcoFalke referenced this in commit 295a1ad522 on Jan 7, 2019
  16. MarcoFalke deleted the branch on Jan 7, 2019
  17. jasonbcox referenced this in commit 6d889411ee on Sep 2, 2020
  18. Munkybooty referenced this in commit 24694beb11 on Aug 20, 2021
  19. Munkybooty referenced this in commit 034216ab27 on Aug 21, 2021
  20. Munkybooty referenced this in commit a538b3ecc1 on Aug 23, 2021
  21. Munkybooty referenced this in commit 31bc9ab19b on Aug 24, 2021
  22. Munkybooty referenced this in commit bb257c6c42 on Aug 24, 2021
  23. Munkybooty referenced this in commit daa7d2f140 on Sep 5, 2021
  24. DrahtBot 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-10-04 22:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me