Skip to content

Conversation

@limpbrains
Copy link
Contributor

@limpbrains limpbrains commented Nov 21, 2024

Description

  • as discussed with @Jasonvdb we are now always trying to get fresh fees for LDK. Never use cached value. We try mempool and blocktank. Both sources two times before we fail. Also with 10 seconds timeout. If function fails, it throws an error, LDK needs to process it.
  • same for blockdata. We check that electrum is connected and block data is not the default one.
  • we do not start LDK unless we make sure both getFees and getBestBlock works
  • getFees is covered with unit tests
  • simplified onchain fee fetching logic for Bitkit, as it is covered by beignet
  • show error if LDK start / refresh fails
  • react-native-ldk probably needs to be updated to handle possible exceptions @Jasonvdb

Linked Issues/Tasks

closes #2352

Type of change

Refactoring

Tests

Unit test

QA Notes

Everything should work as before. Just LDK should not start if network is down and should show an error

@limpbrains limpbrains force-pushed the ldk-fees branch 8 times, most recently from 344c3ce to a8dc171 Compare November 25, 2024 12:44
@synonymdev synonymdev deleted a comment from socket-security bot Nov 25, 2024
@limpbrains limpbrains changed the title Ldk fees fix: do not start LDK unless we have fresh fee and block data Nov 25, 2024
@limpbrains limpbrains force-pushed the ldk-fees branch 3 times, most recently from 1f1658e to e67a717 Compare November 26, 2024 19:37
@limpbrains limpbrains requested review from Jasonvdb and pwltr November 26, 2024 23:18
@limpbrains limpbrains marked this pull request as ready for review November 26, 2024 23:18
@Jasonvdb Jasonvdb merged commit 66a4870 into master Nov 28, 2024
7 checks passed
@Jasonvdb Jasonvdb deleted the ldk-fees branch November 28, 2024 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Using cached/stale fee rate and block header data causes lightning issues

4 participants