lnd.xprv/lnwallet
Olaoluwa Osuntokun fa160f559c
multi: replace per channel sigPool with global daemon level sigPool
In this commit, we remove the per channel `sigPool` within the
`lnwallet.LightningChannel` struct. With this change, we ensure that as
the number of channels grows, the number of gouroutines idling in the
sigPool stays constant. It's the case that currently on the daemon, most
channels are likely inactive, with only a hand full actually
consistently carrying out channel updates. As a result, this change
should reduce the amount of idle CPU usage, as we have less active
goroutines in select loops.

In order to make this change, the `SigPool` itself has been publicly
exported such that outside callers can make a `SigPool` and pass it into
newly created channels. Since the sig pool now lives outside the
channel, we were also able to do away with the Stop() method on the
channel all together.

Finally, the server is the sub-system that is currently responsible for
managing the `SigPool` within lnd.
2018-12-16 15:40:14 -08:00
..
btcwallet Add listunspent RPC call 2018-12-11 15:26:38 +01:00
channel_test.go multi: replace per channel sigPool with global daemon level sigPool 2018-12-16 15:40:14 -08:00
channel.go multi: replace per channel sigPool with global daemon level sigPool 2018-12-16 15:40:14 -08:00
config.go multi: sort import paths with gofmt 2018-08-02 18:20:49 -07:00
errors.go config: add option to disable incoming push amounts in OpenChannel 2018-11-02 01:54:02 +02:00
fee_estimator_test.go lnwallet: switch fee estimation to return sat/kw fee rates 2018-08-09 17:29:48 -07:00
fee_estimator.go lnwallet: fix logging error when fee is too low in BtcdFeeEstimator 2018-10-23 18:42:26 -07:00
interface_test.go multi: switch from bolt packge to bbolt package for all imports 2018-11-29 20:33:49 -08:00
interface.go Add listunspent RPC call 2018-12-11 15:26:38 +01:00
log.go multi: init subsystem loggers via build pkg 2018-10-05 13:04:45 +09:00
parameters.go multi: switch over import paths from roasbeef/* to btcsuite/* 2018-07-13 17:05:39 -07:00
README.md multi: fix typos in comments 2018-04-17 19:03:27 -07:00
reservation.go multi: fix function references in comments and clarify grammar 2018-09-27 20:59:59 -07:00
script_utils_test.go lnwallet: update GetUtxo to accept the pkScript to comply with new gcs filter 2018-07-31 21:28:56 -07:00
script_utils.go lnwallet: export the Ripemd160H function 2018-10-12 08:50:07 +02:00
signdescriptor_test.go multi: sort import paths with gofmt 2018-08-02 18:20:49 -07:00
signdescriptor.go multi: sort import paths with gofmt 2018-08-02 18:20:49 -07:00
sigpool.go multi: replace per channel sigPool with global daemon level sigPool 2018-12-16 15:40:14 -08:00
size_test.go multi: sort import paths with gofmt 2018-08-02 18:20:49 -07:00
size.go lnwallet/size: correct commit to-local and 2nd stage script sizes 2018-07-24 22:53:13 -07:00
test_utils.go multi: replace per channel sigPool with global daemon level sigPool 2018-12-16 15:40:14 -08:00
transactions_test.go multi: sort import paths with gofmt 2018-08-02 18:20:49 -07:00
txout_test.go multi: switch over import paths from roasbeef/* to btcsuite/* 2018-07-13 17:05:39 -07:00
txout.go multi: switch over import paths from roasbeef/* to btcsuite/* 2018-07-13 17:05:39 -07:00
wallet.go Add a maxconfirms argument to ListUnspentWitness 2018-10-28 15:55:18 +01:00
witnessgen.go multi: switch over import paths from roasbeef/* to btcsuite/* 2018-07-13 17:05:39 -07:00

lnwallet

Build Status MIT licensed GoDoc

The lnwallet package implements an abstracted wallet controller that is able to drive channel funding workflows, a number of script utilities, witness generation functions for the various Lightning scripts, revocation key derivation, and the commitment update state machine.

The package is used within lnd as the core wallet of the daemon. The wallet itself is composed of several distinct interfaces that decouple the implementation of things like signing and blockchain access. This separation allows new WalletController implementations to be easily dropped into lnd without disrupting the code base. A series of integration tests at the interface level are also in place to ensure conformance of the implementation with the interface.

Installation and Updating

$ go get -u github.com/lightningnetwork/lnd/lnwallet