This tests that we don't crash if bitcoind backend gives bad estimatefees.
(node_factory, bitcoind)
| 2165 | |
| 2166 | |
| 2167 | def test_bitcoin_bad_estimatefee(node_factory, bitcoind): |
| 2168 | """ |
| 2169 | This tests that we don't crash if bitcoind backend gives bad estimatefees. |
| 2170 | """ |
| 2171 | plugin = os.path.join(os.getcwd(), "tests/plugins/badestimate.py") |
| 2172 | l1 = node_factory.get_node(options={"disable-plugin": "bcli", |
| 2173 | "plugin": plugin, |
| 2174 | "badestimate-badorder": True}, |
| 2175 | start=False, |
| 2176 | may_fail=True) |
| 2177 | l1.daemon.start(wait_for_initialized=False, stderr_redir=True) |
| 2178 | assert l1.daemon.wait() == 1 |
| 2179 | l1.daemon.is_in_stderr(r"badestimate.py error: bad response to estimatefees.feerates \(Blocks must be ascending order: 2 <= 100!\)") |
| 2180 | |
| 2181 | del l1.daemon.opts["badestimate-badorder"] |
| 2182 | l1.start() |
| 2183 | |
| 2184 | l2 = node_factory.get_node(options={"disable-plugin": "bcli", |
| 2185 | "plugin": plugin}) |
| 2186 | # Give me some funds. |
| 2187 | bitcoind.generate_block(5) |
| 2188 | l1.fundwallet(100 * 10**8) |
| 2189 | l1.connect(l2) |
| 2190 | l1.rpc.fundchannel(l2.info["id"], 50 * 10**8) |
| 2191 | |
| 2192 | |
| 2193 | def test_bcli(node_factory, bitcoind, chainparams): |
nothing calls this directly
no test coverage detected