lnd.xprv/lnwallet/chanvalidate
Olaoluwa Osuntokun c199ad30ac
lnwallet/chanvalidate: create new channel validation package
In this commit, we create a new `chanvalidate` package which it to house
all logic required for 1st and 3rd party channel verification. 1st party
verification occurs when we find a channel in the chain that is
allegedly ours, while 3rd party verification will occur when a peer
sends us a channel proof of a new channel.

In the scope of the recent CVE, we actually fully verified 3rd party
channels, but failed to also include those checks in our 1st party
verification code. In order to unify this logic, and prevent future
issues, in this PR we move to concentrate all validation logic into a
single function. Both 1st and 3rd party validation will then use this
function. Additionally, having all the logic in a single place makes it
easier to audit, and also write tests against.
2019-10-03 16:23:14 -07:00
..
validate_test.go lnwallet/chanvalidate: create new channel validation package 2019-10-03 16:23:14 -07:00
validate.go lnwallet/chanvalidate: create new channel validation package 2019-10-03 16:23:14 -07:00