Test that the closing fee negotiation step works, 100%
(node_factory, bitcoind, chainparams)
| 459 | |
| 460 | @unittest.skipIf(TEST_NETWORK == 'liquid-regtest', "Different closing fees") |
| 461 | def test_closing_negotiation_step_100pct(node_factory, bitcoind, chainparams): |
| 462 | """Test that the closing fee negotiation step works, 100%""" |
| 463 | opts = {} |
| 464 | opts['fee_negotiation_step'] = '100%' |
| 465 | |
| 466 | opts['close_initiated_by'] = 'opener' |
| 467 | opts['expected_close_fee'] = 20001 |
| 468 | closing_negotiation_step(node_factory, bitcoind, chainparams, opts) |
| 469 | |
| 470 | # The close fee of 20499 looks strange in this case - one would expect |
| 471 | # to have a number close to 21000. This is because |
| 472 | # * the range is initially set to [20000 (peer), 21000 (opener)] |
| 473 | # * the opener is always first to propose, he uses 50% step, so he proposes 20500 |
| 474 | # * the range is narrowed to [20001, 20499] and the peer proposes 20499 |
| 475 | opts['close_initiated_by'] = 'peer' |
| 476 | opts['expected_close_fee'] = 20499 |
| 477 | closing_negotiation_step(node_factory, bitcoind, chainparams, opts) |
| 478 | |
| 479 | |
| 480 | @unittest.skipIf(TEST_NETWORK == 'liquid-regtest', "Different closing fees") |
nothing calls this directly
no test coverage detected