[qa] wallet_basic: Specify minimum required amount for listunspent #13535

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1806-qaWalletBasic changing 1 files +2 −2
  1. MarcoFalke commented at 1:11 PM on June 25, 2018: member

    A value less than that would fail the tests later on anyway:

    File "./test/functional/wallet_basic.py", line 250, in run_test
        self.nodes[1].sendrawtransaction(signed_raw_tx['hex'])
    
    test_framework.authproxy.JSONRPCException: bad-txns-in-belowout, value in (1.00) < value out (49.998) (code 16) (-26)
    
  2. MarcoFalke added the label Tests on Jun 25, 2018
  3. MarcoFalke requested review from promag on Jun 25, 2018
  4. MarcoFalke commented at 1:12 PM on June 25, 2018: member

    Can trivially be bisected with while ./test/functional/test_runner.py $(for i in {0..16}; do echo -n 'wallet_basic '; done) -j 16 -k ; do true; done

  5. promag commented at 1:59 PM on June 25, 2018: member

    IMO tests should be independent.

    How about ensuring the test in L250 succeeds: generate a block and set query_options.minimumAmount in https://github.com/bitcoin/bitcoin/blob/b1dc39df6ec878d06fc7217a3d7bf07397edf3ea/test/functional/wallet_basic.py#L242?

  6. MarcoFalke force-pushed on Jun 25, 2018
  7. MarcoFalke commented at 2:14 PM on June 25, 2018: member

    Done, makes sense.

  8. [qa] wallet_basic: Specify minimum required amount for listunspent fa103a5d5e
  9. in test/functional/wallet_basic.py:135 in fab28317c7 outdated
     131 | @@ -132,8 +132,8 @@ def run_test(self):
     132 |          # An output should be unlocked when spent
     133 |          unspent_0 = self.nodes[1].listunspent()[0]
     134 |          self.nodes[1].lockunspent(False, [unspent_0])
     135 | -        tx = self.nodes[1].createrawtransaction([unspent_0], { self.nodes[1].getnewaddress() : 1 })
    


    promag commented at 3:18 PM on June 25, 2018:

    Still want to keep this change?


    MarcoFalke commented at 5:24 PM on June 25, 2018:

    Reworked pull according to your suggestions.

  10. MarcoFalke force-pushed on Jun 25, 2018
  11. MarcoFalke renamed this:
    [qa] wallet_basic: Avoid creating tiny output early on
    [qa] wallet_basic: Specify minimum required amount for listunspent
    on Jun 25, 2018
  12. in test/functional/wallet_basic.py:242 in fa103a5d5e
     238 | @@ -239,8 +239,8 @@ def run_test(self):
     239 |          # 2. hex-changed one output to 0.0
     240 |          # 3. sign and send
     241 |          # 4. check if recipient (node0) can list the zero value tx
     242 | -        usp = self.nodes[1].listunspent()
     243 | -        inputs = [{"txid": usp[0]['txid'], "vout": usp[0]['vout']}]
     244 | +        usp = self.nodes[1].listunspent(query_options={'minimumAmount': '49.998'})[0]
    


    promag commented at 5:42 PM on June 25, 2018:

    nit, , 'maximumCount': 1.

  13. promag commented at 5:42 PM on June 25, 2018: member

    utACK fa103a5.

  14. jnewbery commented at 7:53 PM on June 27, 2018: member

    Tested ACK fa103a5d5e90e2c947899bc31f3f68744adff321.

  15. MarcoFalke merged this on Jun 28, 2018
  16. MarcoFalke closed this on Jun 28, 2018

  17. MarcoFalke referenced this in commit 2328039bfc on Jun 28, 2018
  18. MarcoFalke deleted the branch on Jun 28, 2018
  19. deadalnix referenced this in commit ecbe61b289 on Jun 1, 2020
  20. PastaPastaPasta referenced this in commit fdde5cad6b on Jul 7, 2020
  21. PastaPastaPasta referenced this in commit 70bcccdf57 on Jul 7, 2020
  22. PastaPastaPasta referenced this in commit d8ef30b1a7 on Jul 8, 2020
  23. ftrader referenced this in commit 3cc62139d6 on Aug 17, 2020
  24. MarcoFalke locked this on Sep 8, 2021
Labels

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: 2026-04-17 06:15 UTC

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