(node_factory, bitcoind, chainparams)
| 1304 | @unittest.skipIf(TEST_NETWORK != 'regtest', 'elementsd doesnt yet support PSBT features we need') |
| 1305 | @pytest.mark.openchannel('v2') |
| 1306 | def test_rbf_no_overlap(node_factory, bitcoind, chainparams): |
| 1307 | l1, l2 = node_factory.get_nodes(2, |
| 1308 | opts={'allow_warning': True}) |
| 1309 | |
| 1310 | l1.rpc.connect(l2.info['id'], 'localhost', l2.port) |
| 1311 | amount = 2**24 |
| 1312 | chan_amount = 100000 |
| 1313 | bitcoind.rpc.sendtoaddress(l1.rpc.newaddr()['p2tr'], amount / 10**8 + 0.01) |
| 1314 | bitcoind.rpc.sendtoaddress(l1.rpc.newaddr()['p2tr'], amount / 10**8 + 0.01) |
| 1315 | bitcoind.generate_block(1) |
| 1316 | # Wait for it to arrive. |
| 1317 | wait_for(lambda: len(l1.rpc.listfunds()['outputs']) > 0) |
| 1318 | |
| 1319 | res = l1.rpc.fundchannel(l2.info['id'], chan_amount) |
| 1320 | chan_id = res['channel_id'] |
| 1321 | |
| 1322 | # Check that we're waiting for lockin |
| 1323 | l1.daemon.wait_for_log(' to DUALOPEND_AWAITING_LOCKIN') |
| 1324 | |
| 1325 | next_feerate = find_next_feerate(l1, l2) |
| 1326 | |
| 1327 | # Initiate an RBF (this grabs the non-reserved utxo, which isnt the |
| 1328 | # one we started with) |
| 1329 | startweight = 42 + 172 # base weight, funding output |
| 1330 | initpsbt = l1.rpc.fundpsbt(chan_amount, next_feerate, startweight, |
| 1331 | excess_as_change=True) |
| 1332 | |
| 1333 | # Do the bump |
| 1334 | bump = l1.rpc.openchannel_bump(chan_id, chan_amount, initpsbt['psbt']) |
| 1335 | |
| 1336 | with pytest.raises(RpcError, match='No overlapping input present.'): |
| 1337 | l1.rpc.openchannel_update(chan_id, bump['psbt']) |
| 1338 | |
| 1339 | |
| 1340 | @unittest.skipIf(TEST_NETWORK != 'regtest', 'elementsd doesnt yet support PSBT features we need') |
nothing calls this directly
no test coverage detected