Test that deleting a blockdepth watch removes it from the datastore
(node_factory, bitcoind)
| 5853 | |
| 5854 | |
| 5855 | def test_bwatch_blockdepth_watch_remove(node_factory, bitcoind): |
| 5856 | """Test that deleting a blockdepth watch removes it from the datastore""" |
| 5857 | l1 = node_factory.get_node(options=BWATCH_OPTS) |
| 5858 | |
| 5859 | l1.daemon.wait_for_log(r'No block change') |
| 5860 | |
| 5861 | info = l1.rpc.getinfo() |
| 5862 | start_block = info['blockheight'] |
| 5863 | |
| 5864 | owner = f"channel/funding_depth/888" |
| 5865 | l1.rpc.addblockdepthwatch(owner=owner, start_block=start_block) |
| 5866 | |
| 5867 | # Verify it's present |
| 5868 | watches = l1.rpc.listwatch()['watches'] |
| 5869 | assert any(owner in w.get('owners', []) for w in watches if w.get('type') == 'blockdepth') |
| 5870 | |
| 5871 | # Delete it |
| 5872 | l1.rpc.delblockdepthwatch(owner=owner, start_block=start_block) |
| 5873 | |
| 5874 | watches = l1.rpc.listwatch()['watches'] |
| 5875 | assert not any(owner in w.get('owners', []) for w in watches if w.get('type') == 'blockdepth') |
| 5876 | |
| 5877 | |
| 5878 | def test_bwatch_blockdepth_watch_multiple_owners(node_factory, bitcoind): |
nothing calls this directly
no test coverage detected