core-lightning/contrib
Rusty Russell e4950db9a3 pytest: recreate wallet on bitcoind restart.
Doesn't seem to stick in master.  Andy Chow suggested we
simply turn off wallet on older versions, and always create/load.

```
[gw8] [ 40%] FAILED tests/test_misc.py::test_bitcoind_goes_backwards

============================================================= FAILURES ==============================================================
___________________________________________________ test_bitcoind_goes_backwards ____________________________________________________
[gw8] linux -- Python 3.8.5 /usr/bin/python3

node_factory = <pyln.testing.utils.NodeFactory object at 0x7f931859a760>
bitcoind = <pyln.testing.utils.BitcoinD object at 0x7f931865eee0>

    def test_bitcoind_goes_backwards(node_factory, bitcoind):
        """Check that we refuse to acknowledge bitcoind giving a shorter chain without explicit rescan"""
        l1 = node_factory.get_node(may_fail=True, allow_broken_log=True)

        bitcoind.generate_block(10)
        sync_blockheight(bitcoind, [l1])
        l1.stop()

        # Now shrink chain (invalidateblock leaves 'headers' field until restart)
        bitcoind.rpc.invalidateblock(bitcoind.rpc.getblockhash(105))
        # Restart without killing proxies
        bitcoind.rpc.stop()
        TailableProc.stop(bitcoind)
        bitcoind.start()

        # Will simply refuse to start.
        with pytest.raises(ValueError):
            l1.start()

        # Nor will it start with if we ask for a reindex of fewer blocks.
        l1.daemon.opts['rescan'] = 3

        with pytest.raises(ValueError):
            l1.start()

        # This will force it, however.
        l1.daemon.opts['rescan'] = -100
        l1.start()

        # Now mess with bitcoind at runtime.
>       bitcoind.generate_block(6)

tests/test_misc.py:1307:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
contrib/pyln-testing/pyln/testing/utils.py:399: in generate_block
    return self.rpc.generatetoaddress(numblocks, self.rpc.getnewaddress())
contrib/pyln-testing/pyln/testing/utils.py:322: in f
    return proxy._call(name, *args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <bitcoin.rpc.RawProxy object at 0x7f93184f6a30>, service_name = 'getnewaddress', args = ()
postdata = '{"version": "1.1", "method": "getnewaddress", "params": [], "id": 1}'
headers = {'Authorization': b'Basic cnBjdXNlcjpycGNwYXNz', 'Content-type': 'application/json', 'Host': 'localhost', 'User-Agent': 'AuthServiceProxy/0.1'}
response = {'error': {'code': -18, 'message': 'No wallet is loaded. Load a wallet using loadwallet or create a new one with createwallet. (Note: A default wallet is no longer automatically created)'}, 'id': 1, 'result': None}
```
2020-12-03 11:35:30 +01:00
..
init systemd: After=network-online.target 2019-08-20 20:14:36 +02:00
plugins JSON-RPC: getmanifest passes allow-deprecated-apis flag. 2020-08-11 08:43:18 +09:30
pylightning pyln: Add unit tests from pyln-* to make check-python 2020-02-01 16:50:58 +01:00
pyln-client pyln: failing test msat from float str 2020-12-02 10:37:31 +10:30
pyln-proto pyln: Bump cryptography dependency to 3.2 due to upstream bug 2020-10-29 11:11:48 +10:30
pyln-spec pyln-proto, pyln-spec: fix 'make prod-release' target. 2020-06-29 18:01:12 +02:00
pyln-testing pytest: recreate wallet on bitcoind restart. 2020-12-03 11:35:30 +01:00
reprobuild repro: Add missing Dockerfiles 2020-09-16 06:27:12 +09:30
sanitizer_suppressions contrib: remove ASAN suppressions 2020-10-21 19:34:39 +02:00
bootstrap-node.sh contrib: add executable flag for bootstrap-node.sh 2020-05-05 13:27:55 +09:30
Dockerfile.builder build: add mkrd to docker install? 2020-04-19 08:07:47 +09:30
Dockerfile.builder.fedora build: add mkrd to docker install? 2020-04-19 08:07:47 +09:30
lightning-cli.bash-completion Fix bash completion. 2020-05-15 15:25:33 +02:00
linuxarm32v7.Dockerfile Add python to runtime docker image (arm32/64) 2020-08-24 20:23:25 +02:00
linuxarm64v8.Dockerfile Add python to runtime docker image (arm32/64) 2020-08-24 20:23:25 +02:00
short_channel_id-to-txid.sh Add compability to current formalism to short_channel_id-to-txid.sh 2019-10-04 00:38:52 +00:00
startup_regtest.sh contrib: make bitcoin polling and gossip propagation snappier 2020-09-17 10:14:22 +09:30