Skip to content

Commit

Permalink
LTC fee bug compensation
Browse files Browse the repository at this point in the history
  • Loading branch information
kajoseph committed Jul 31, 2023
1 parent b21eebb commit cccf3b1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/bitcore-node/src/routes/api/fee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ router.get('/:target', CacheMiddleware(CacheTimes.Second), async (req: Request,
if (!fee) {
return res.status(404).send('not available right now');
}
// As of v0.21.2.2, Litecoin Core has a bug where it returns a fee rate of 0.00000999 which is below the min relay fee (0.00001).
// TODO: remove this if statement once https://github.com/litecoin-project/litecoin/issues/908 is fixed.
if (chain === 'LTC' && fee.feerate && fee.feerate < 0.00001) {
fee.feerate = 0.00001;
}
feeCache[`${chain}:${network}:${target}`] = { fee, date: Date.now() };
return res.json(fee);
} catch (err) {
Expand Down

0 comments on commit cccf3b1

Please sign in to comment.