t(minor) simplification - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 0848aa259d0a81c4ee171f0e95c5f47878d29eb7 DIR parent d5c03307c3b3cea8b7c60eb5dba43a3cd5de1e7d HTML Author: ThomasV <thomasv@electrum.org> Date: Wed, 26 Feb 2020 11:30:19 +0100 (minor) simplification Diffstat: M electrum/lnpeer.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- DIR diff --git a/electrum/lnpeer.py b/electrum/lnpeer.py t@@ -1413,15 +1413,13 @@ class Peer(Logger): if abs(our_fee - their_fee) < 2: our_fee = their_fee break - # BOLT2: receiver MUST propose a value "strictly between" the received fee_satoshis and its previously-sent fee_satoshis. - our_fee = (our_fee + (1 if our_fee < their_fee else -1) + their_fee) // 2 + # this will be "strictly between" (as in BOLT2) previous values because of the above + our_fee = (our_fee + their_fee) // 2 # another round send_closing_signed() # the non-funder replies if not chan.constraints.is_initiator: send_closing_signed() - - self.logger.info(f'closing loop end') # add signatures closing_tx.add_signature_to_txin(txin_idx=0, signing_pubkey=chan.config[LOCAL].multisig_key.pubkey.hex(),