MCPcopy Create free account
hub / github.com/ElementsProject/lightning / run_retry

Function run_retry

tests/test_opening.py:1180–1199  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1178 assert inflights[-1]['funding_txid'] in bitcoind.rpc.getrawmempool()
1179
1180 def run_retry():
1181 startweight = 42 + 173
1182 rate = int(find_next_feerate(l1, l2)[:-5])
1183 # We 2x the feerate to beat the min-relay fee
1184 next_feerate = '{}perkw'.format(rate * 2)
1185 initpsbt = l1.rpc.utxopsbt(chan_amount, next_feerate, startweight,
1186 prev_utxos, reservedok=True,
1187 excess_as_change=True)
1188
1189 l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
1190 bump = l1.rpc.openchannel_bump(chan_id, chan_amount,
1191 initpsbt['psbt'],
1192 funding_feerate=next_feerate)
1193 # We should be able to call this with while an open is progress
1194 # but not yet committed
1195 l1.rpc.dev_sign_last_tx(l2.info['id'])
1196 update = l1.rpc.openchannel_update(chan_id, bump['psbt'])
1197 assert update['commitments_secured']
1198
1199 return l1.rpc.signpsbt(update['psbt'])['signed_psbt']
1200
1201 signed_psbt = run_retry()
1202 l1.rpc.openchannel_signed(chan_id, signed_psbt)

Callers 3

test_rbf_non_last_minedFunction · 0.85

Calls 7

find_next_feerateFunction · 0.85
utxopsbtMethod · 0.80
openchannel_bumpMethod · 0.80
dev_sign_last_txMethod · 0.80
openchannel_updateMethod · 0.80
signpsbtMethod · 0.80
connectMethod · 0.45

Tested by

no test coverage detected