(node_factory, bitcoind, script, expected_balances=None, fee_multiplier=None)
| 619 | # by the fee * fee_multiplier. For example [0, -1] reduces the second channels expected balance |
| 620 | # by the fee value |
| 621 | def execute_script(node_factory, bitcoind, script, expected_balances=None, fee_multiplier=None): |
| 622 | nodes, chanids = make_chans(node_factory, script.count("{}")) |
| 623 | result = nodes[1].rpc.splice(script.format(*chanids), debug_log=True) |
| 624 | |
| 625 | # Extract the fee that splice scripts thinks we're using from the logs |
| 626 | nodes[1].daemon.wait_for_log(r'calc_in_ppm_and_fee starting calculations FINALIZING PASS') |
| 627 | # It can either be "fee x" or "x fee" so we match on both |
| 628 | logline = nodes[1].daemon.wait_for_log(r'(fee [0-9]+sat)|([0-9]+sat fee)') |
| 629 | # Try both regex versions |
| 630 | reg_res = re.search(r'fee ([0-9]+)sat', logline) or re.search(r'([0-9]+)sat fee', logline) |
| 631 | |
| 632 | # now we should know the fee |
| 633 | fee = reg_res.group(1) |
| 634 | |
| 635 | verify_chans(nodes, bitcoind, result['txid'], chanids, int(fee), expected_balances, fee_multiplier) |
| 636 | |
| 637 | |
| 638 | @pytest.mark.openchannel('v1') |
no test coverage detected