Skip to content

Commit 5b83eff

Browse files
pytest: update examples generation for listpeerchannels
with fixed our/their_max_htlc_value_in_flight_msat values suggested by @ShahanaFarooqui
1 parent a6e476a commit 5b83eff

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/autogenerate-rpc-examples.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1972,6 +1972,8 @@ def generate_list_examples(l1, l2, l3, c12, c23_2, inv_l31, inv_l32, offer_l23,
19721972
channel['alias']['local'] = '3000000' + str(i) + 'x6000000' + str(i) + 'x6000' + str(i)
19731973
channel['alias']['remote'] = '1000000' + str(i) + 'x2000000' + str(i) + 'x3000' + str(i)
19741974
channel['max_total_htlc_in_msat'] = NEW_VALUES_LIST['htlc_max_msat']
1975+
channel['their_max_htlc_value_in_flight_msat'] = NEW_VALUES_LIST['htlc_max_msat']
1976+
channel['our_max_htlc_value_in_flight_msat'] = NEW_VALUES_LIST['htlc_max_msat']
19751977
for j, state in enumerate(channel['state_changes'], start=1):
19761978
state['timestamp'] = '2024-10-10T00:0' + str(j) + ':00.000Z'
19771979
update_example(node=l1, method='listpeerchannels', params={'id': l2.info['id']}, response=listpeerchannels_res1)
@@ -1991,6 +1993,8 @@ def generate_list_examples(l1, l2, l3, c12, c23_2, inv_l31, inv_l32, offer_l23,
19911993
channel['close_to'] = 'db2dec31' + (('0' + str(i)) * 30)
19921994
channel['status'][0] = re.sub(r'(tx:)[a-f0-9]+', r'\1' + scrt_id, channel['status'][0])
19931995
channel['max_total_htlc_in_msat'] = NEW_VALUES_LIST['htlc_max_msat']
1996+
channel['their_max_htlc_value_in_flight_msat'] = NEW_VALUES_LIST['htlc_max_msat']
1997+
channel['our_max_htlc_value_in_flight_msat'] = NEW_VALUES_LIST['htlc_max_msat']
19941998
if 'inflight' in channel and len(channel['inflight']) > 0:
19951999
channel['inflight'][0]['scratch_txid'] = scrt_id
19962000
for j, state in enumerate(channel['state_changes'], start=1):

0 commit comments

Comments
 (0)