Test that we eventually fuzz nLockTime for withdrawal transactions.
(node_factory, bitcoind)
| 2199 | |
| 2200 | @unittest.skipIf(VALGRIND, "A big loop is used to check fuzz.") |
| 2201 | def test_withdraw_nlocktime_fuzz(node_factory, bitcoind): |
| 2202 | """ |
| 2203 | Test that we eventually fuzz nLockTime for withdrawal transactions. |
| 2204 | """ |
| 2205 | l1 = node_factory.get_node(1) |
| 2206 | l1.fundwallet(10**8) |
| 2207 | |
| 2208 | for i in range(100): |
| 2209 | addr = l1.rpc.newaddr("bech32")["bech32"] |
| 2210 | withdraw = l1.rpc.withdraw(addr, 10**3) |
| 2211 | bitcoind.generate_block(1) |
| 2212 | l1.daemon.wait_for_log('Owning output .* txid {} CONFIRMED'. |
| 2213 | format(withdraw["txid"])) |
| 2214 | decoded = bitcoind.rpc.decoderawtransaction(withdraw["tx"]) |
| 2215 | tip = node_factory.bitcoind.rpc.getblockcount() |
| 2216 | assert decoded["locktime"] > 0 |
| 2217 | if decoded["locktime"] < tip: |
| 2218 | return |
| 2219 | else: |
| 2220 | raise Exception("No transaction with fuzzed nLockTime !") |
| 2221 | |
| 2222 | |
| 2223 | def test_multiwithdraw_simple(node_factory, bitcoind, chainparams): |
nothing calls this directly
no test coverage detected