Commit Graph

7 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
c6b653457b lnwallet: add new WebApiFeeEstimator for API fee estimation.
Co-authored-by: Valentine Wallace <vwallace@protonmail.com>
2019-04-16 14:16:53 -07:00
Valentine Wallace
4944eb3e54 lnwallet: add implementation of WebApiFeeSource for external APIs
This enables users to specify an external API for fee estimation.
The API is expected to return fees in the JSON format:
`{
	fee_by_block_target: {
	   a: x,
	   b: y,
	   ...
	   c: z
        }
 }`
 where a, b, c are block targets and x, y, z are fees in sat/kb.
 Note that a, b, c need not be contiguous.
2019-04-16 13:50:40 -07:00
Joost Jager
91f3df07e4
lnwallet: prevent static fee estimator fees from being modified
Modifying the static fees is not thread safe. In this commit the fees
are made immutable.
2018-12-18 10:50:05 +01:00
Wilmer Paulino
b3d5d7ab9c
lnwallet: switch fee estimation to return sat/kw fee rates
In this commit, we modify our FeeEstimator interface to return an
estimated fee rate in sat/kw. Recently, due to low fees on the network,
users have been experiencing failures broadcasting transactions due to
not meeting specific fee requirements. This was happening more often
than not, as the estimated fee returned by backend nodes (bitcoind and
btcd) only takes into account vbytes, rather than weight. The fees
returned are also expressed in sat/kb, so we must take care that we do
not lose precision while converting to sat/kw. In the event that this
happens, a fee floor of 253 sat/kw has been added. This fee rate
originates from bitcoind rounding up the conversion from weight to
vbytes.
2018-08-09 17:29:48 -07:00
Conner Fromknecht
1ded697e8d
multi: sort import paths with gofmt 2018-08-02 18:20:49 -07:00
Olaoluwa Osuntokun
6f60f139f4 multi: switch over import paths from roasbeef/* to btcsuite/* 2018-07-13 17:05:39 -07:00
Johan T. Halseth
dd6872da31
lnwallet test: add TestFeeRateTypes and TestStaticFeeEstimator 2018-02-26 22:42:27 +01:00