Commit Graph

3 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
30c4196f91
lnwallet: remove the closeObserver from the channel state machine
In this PR, we entirely remove the closeObserver from the channel state
machine. It was added very early on before most of the other aspects of
the daemon were built out. This goroutine was responsible for
dispatching notifications to outside parties if the commitment
transaction was spent at all. This had several issues, since it was
linked to the *lifetime* of the channel state machine itself. As a
result of this linkage, we had to do weird stuff like hand off in
memory pointers to the state machine in order to ensure notifications
were properly dispatched.
2018-01-22 19:19:47 -08:00
Olaoluwa Osuntokun
1d7a1ac0ee
lnwallet: update channel state machine tests to use distinct keys
In this commit, we update the channel state machine tests to use a new
key for each purpose. Before this commit, the same key would be used
the entire time. As a result, a few bugs slipped by that would’ve been
detected if we used fresh keys for each purpose. Additionally, this
reflect the real world case as we always use distinct keys for each
purpose to avoid key re-use.
2018-01-22 19:19:32 -08:00
Jim Posen
0becaddcd5 lnwallet: Move mocks to separate file and augment mockSigner.
To implement the BOLT 03 test vectors, a more powerful mockSigner is
required. The new version of mockSigner stores multiple keys and signs
the transaction outputs with the appropriate one.
2018-01-22 19:00:28 -08:00