Test outpoint watch datastore operations
(node_factory, bitcoind)
| 5253 | |
| 5254 | |
| 5255 | def test_bwatch_outpoint_watch(node_factory, bitcoind): |
| 5256 | """Test outpoint watch datastore operations""" |
| 5257 | l1 = node_factory.get_node(options=BWATCH_OPTS) |
| 5258 | test_txid = "4" * 64 |
| 5259 | test_outpoint = f"{test_txid}:0" |
| 5260 | |
| 5261 | l1.rpc.addoutpointwatch(owner='wallet/p2wpkh/0', outpoint=test_outpoint, start_block=100) |
| 5262 | |
| 5263 | # Verify it's in the datastore (use any() since wallet may have its own outpoints) |
| 5264 | ds = l1.rpc.listdatastore(['bwatch', 'outpoint']) |
| 5265 | assert any(d['key'] == ['bwatch', 'outpoint', test_outpoint] for d in ds['datastore']) |
| 5266 | |
| 5267 | # Remove it |
| 5268 | l1.rpc.deloutpointwatch(owner='wallet/p2wpkh/0', outpoint=test_outpoint) |
| 5269 | |
| 5270 | ds = l1.rpc.listdatastore(['bwatch', 'outpoint']) |
| 5271 | assert not any(d['key'] == ['bwatch', 'outpoint', test_outpoint] for d in ds['datastore']) |
| 5272 | |
| 5273 | |
| 5274 | def test_bwatch_rescan_triggered_for_past_start_block(node_factory, bitcoind): |
nothing calls this directly
no test coverage detected