Browse Source

lnchannel: save timestamp when we settle

dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
ThomasV 6 years ago
parent
commit
a8e2f79563
  1. 7
      electrum/lnchannel.py

7
electrum/lnchannel.py

@ -615,7 +615,12 @@ class Channel(PrintError):
assert htlc.payment_hash == sha256(preimage)
assert htlc_id not in log['settles']
self.hm.send_settle(htlc_id)
# not saving preimage because it's already saved in LNWorker.invoices
# save timestamp in LNWorker.preimages
try:
self.save_preimage(htlc.payment_hash, preimage, timestamp=int(time.time()))
except:
import traceback
traceback.print_exc()
def receive_htlc_settle(self, preimage, htlc_id):
self.print_error("receive_htlc_settle")

Loading…
Cancel
Save