Browse Source

submarine_swaps: increase min locktime delta for reverse swap to 60

10 blocks is not enough to get a tx confirmed without worrying...
bip39-recovery
SomberNight 5 years ago
parent
commit
fcbc1c9a45
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 4
      electrum/submarine_swaps.py

4
electrum/submarine_swaps.py

@ -308,8 +308,8 @@ class SwapManager(Logger):
raise Exception(f"rswap check failed: onchain_amount is less than what we expected: "
f"{onchain_amount} < {expected_amount}")
# verify that we will have enough time to get our tx confirmed
if locktime - self.network.get_local_height() <= 10:
raise Exception("fswap check failed: locktime too close")
if locktime - self.network.get_local_height() <= 60:
raise Exception("rswap check failed: locktime too close")
# verify invoice preimage_hash
lnaddr = self.lnworker._check_invoice(invoice)
invoice_amount = lnaddr.get_amount_sat()

Loading…
Cancel
Save