(node_factory, bitcoind)
| 4974 | |
| 4975 | |
| 4976 | def test_set_feerate_offset(node_factory, bitcoind): |
| 4977 | opts = [{'commit-feerate-offset': 100}, {}] |
| 4978 | l1, l2 = node_factory.get_nodes(2, opts=opts) |
| 4979 | assert l1.daemon.is_in_log('Server started with public key') |
| 4980 | configs = l1.rpc.listconfigs()['configs'] |
| 4981 | assert configs['commit-feerate-offset'] == {'source': 'cmdline', |
| 4982 | 'value_int': 100} |
| 4983 | scid12 = l1.fundchannel(l2)[0] |
| 4984 | # chanid = l1.get_channel_scid(l2) |
| 4985 | |
| 4986 | # node 1 sets fees. |
| 4987 | l1.set_feerates((14000, 11000, 7500, 3750)) |
| 4988 | |
| 4989 | l1.pay(l2, 200000000) |
| 4990 | # First payment causes fee update, which should reflect the feerate offset. |
| 4991 | if 'anchors/even' in only_one(l1.rpc.listpeerchannels()['channels'])['channel_type']['names']: |
| 4992 | feerate = 3850 |
| 4993 | min_feerate = 253 |
| 4994 | else: |
| 4995 | feerate = 11100 |
| 4996 | min_feerate = 1875 |
| 4997 | # our_max is what we're willing to pay ourselves (MAX_OUR_FEERATE_PER_KW), |
| 4998 | # as opposed to max, which is what we'll tolerate from the peer. |
| 4999 | l1.daemon.wait_for_log(f'lightningd: update_feerates: feerate = {feerate}, ' |
| 5000 | f'min={min_feerate}, max=150000, our_max=100000, ' |
| 5001 | f'penalty=7500') |
| 5002 | l2.daemon.wait_for_log(f'peer updated fee to {feerate}') |
| 5003 | l2.pay(l1, 100000000) |
| 5004 | |
| 5005 | # Now shutdown cleanly. |
| 5006 | l1.rpc.close(scid12) |
| 5007 | |
| 5008 | l1.daemon.wait_for_log(' to CLOSINGD_COMPLETE') |
| 5009 | l2.daemon.wait_for_log(' to CLOSINGD_COMPLETE') |
| 5010 | |
| 5011 | |
| 5012 | def test_low_fd_limit(node_factory, bitcoind): |
nothing calls this directly
no test coverage detected