[qa] Test walletpassphrase timeout #7320

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1601-rpcWalletPass changing 1 files +4 −2
  1. MarcoFalke commented at 12:14 PM on January 8, 2016: member

    Test case for #7316

    Test code: $ git checkout fadceb7;make;BITCOIND=bitcoin-qt qa/pull-tester/rpc-tests.py keypool

    ...
    Running testscript keypool.py ...
    Initializing test directory /tmp/testqf3QO4
    Assertion failed: 1452255264 != 0
    
  2. jonasschnelli commented at 12:17 PM on January 8, 2016: contributor

    Nice! utACK.

    But this actually does not test the issue #7316, because the reported issue can only happen when you run bitcoin-qt with -server=1.

  3. MarcoFalke commented at 12:17 PM on January 8, 2016: member

    @jonasschnelli See my "test code" ;)

    Are you still working on the BITCOIND=bitcoin-qt nightly rpc tests?

  4. jonasschnelli commented at 12:20 PM on January 8, 2016: contributor

    @MarcoFalke: Ah. Right. Your testcode looks good. Indeed, this would catch #7316.

    Are you still working on the BITCOIND=bitcoin-qt nightly rpc tests?

    It's relatively far down on my priority list. But not given up...

  5. jonasschnelli added the label Wallet on Jan 8, 2016
  6. jonasschnelli added the label Tests on Jan 8, 2016
  7. [qa] Test walletpassphrase timeout fa1cb1ae15
  8. in qa/rpc-tests/keypool.py:None in fadceb736b outdated
      69 | @@ -70,9 +70,11 @@ def run_test(self):
      70 |              assert(e.error['code']==-12)
      71 |  
      72 |          # refill keypool with three new addresses
      73 | -        nodes[0].walletpassphrase('test', 12000)
      74 | +        nodes[0].walletpassphrase('test', 1)
      75 |          nodes[0].keypoolrefill(3)
      76 | -        nodes[0].walletlock()
      77 | +        # test walletpassphrase timeout
      78 | +        time.sleep(1)
    


    laanwj commented at 3:22 PM on January 9, 2016:

    Concept ACK, but setting a timeout of 1 and then waiting a second is too close. A slight mistiming (e.g. busy machine) would result in a race condition, what about waiting 2 seconds instead?

  9. MarcoFalke force-pushed on Jan 9, 2016
  10. in qa/rpc-tests/keypool.py:None in fa1cb1ae15
      74 | +        nodes[0].walletpassphrase('test', 1)
      75 |          nodes[0].keypoolrefill(3)
      76 | -        nodes[0].walletlock()
      77 | +        # test walletpassphrase timeout
      78 | +        time.sleep(1.1)
      79 | +        assert_equal(nodes[0].getwalletinfo()["unlocked_until"], 0)
    


    luke-jr commented at 5:21 PM on January 15, 2016:

    Maybe this ought to actually try to do something to test the wallet relocking?

  11. laanwj merged this on Jan 18, 2016
  12. laanwj closed this on Jan 18, 2016

  13. laanwj referenced this in commit d3dfc6d7e1 on Jan 18, 2016
  14. MarcoFalke deleted the branch on Jan 18, 2016
  15. luke-jr referenced this in commit 3493110558 on Feb 12, 2016
  16. MarcoFalke referenced this in commit 331655253d on Apr 5, 2016
  17. nomnombtc referenced this in commit ed4e80aa5f on Nov 11, 2016
  18. nomnombtc referenced this in commit 00a904eda4 on Nov 12, 2016
  19. nomnombtc referenced this in commit 61df694e11 on Nov 13, 2016
  20. sickpig referenced this in commit c9bddee7e6 on Nov 14, 2016
  21. random-zebra referenced this in commit e5ca48df61 on Oct 3, 2018
  22. random-zebra referenced this in commit 9572856679 on Oct 3, 2018
  23. MarcoFalke locked this on Sep 8, 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: 2026-04-13 18:15 UTC

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