lnd.xprv/lnwallet/btcwallet
Olaoluwa Osuntokun af4afdb6f0
lnwallet: use btcutil.NewAmount for BTC -> SAT conversions
In this commit, we fix an existing rounding related bug in the codebase.
The RPC interface for btcd and bitcoind return values in BTC rather than
in satoshis. So in several places, we're forced to convert ourselves
manually. The existing logic attempted to do this, but didn't properly
account for rounding. As a result, our values can be off due to not
rounding incorrectly.

The fix for this is easy: simply properly use btcutil.NewAmount
everywhere which does rounding properly.

Fixes #939.
2018-03-25 19:15:18 -07:00
..
blockchain.go lnwallet: use btcutil.NewAmount for BTC -> SAT conversions 2018-03-25 19:15:18 -07:00
btcwallet.go lnwallet: use btcutil.NewAmount for BTC -> SAT conversions 2018-03-25 19:15:18 -07:00
config.go lnwallet/btcwallet/config: add CoinType to configuration 2018-03-13 16:33:46 -07:00
driver.go multi: add bitcoind drivers and tests 2018-01-15 13:59:34 -08:00
signer.go lnwallet/btcwallet/singer: use chainKeyScope to fetch scoped mgr 2018-03-13 16:33:46 -07:00