24e1126776
This commit changes the verification of our code against the spec test vectors to use a more black box approach. It exercises the channel state machine via its external interface as much as possible, making this test more robust. A consequence of this is that the test now runs from the 'root' data from which the test vectors are also derived, meaning that more code is covered too. Running from the root data is also a preparation for _producing_ test vectors for the new anchor commitment format. This will be a matter of changing the channel type and recording the produced commitment and htlc txes. Previously the success transaction was skipped during verification. With this commit, the proper preimage insertion is carried out, allowing the success tx to be checked too. |
||
---|---|---|
.. | ||
btcwallet | ||
chainfee | ||
chanfunding | ||
chanvalidate | ||
channel_test.go | ||
channel.go | ||
commit_sort_test.go | ||
commit_sort.go | ||
commitment.go | ||
config.go | ||
errors.go | ||
interface_test.go | ||
interface.go | ||
log.go | ||
parameters.go | ||
README.md | ||
reservation.go | ||
sigpool.go | ||
test_utils.go | ||
transactions_test.go | ||
transactions.go | ||
wallet.go |
lnwallet
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