Commit Graph

55 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
d0353b2864
lnwallet: add ability to trigger a force closure within channel state machine
This commit introduces the concept of a manually initiated “force”
closer within the channel state machine. A force closure is a closure
initiated by a  local subsystem which broadcasts the current commitment
state directly on-chain rather than attempting to cooperatively
negotiate a closure with the remote party.

A force closure returns a ForceCloseSummary which includes all the
details required for claiming all rightfully owned outputs within the
broadcast commitment transaction.

Additionally two new publicly exported channels are introduced, one
which is closed due a locally initiated force closure, and the other
which is closed once we detect that the remote party has executed a
unilateral closure by broadcasting their version of the commitment
transaction.
2016-09-12 19:07:35 -07:00
Olaoluwa Osuntokun
d2acb4336c
test: add method to dump logs of a node within the networkHarness
At times when testing one requires access to the logs of a particular
node in order to aide with debugging. Before this commit, one needed to
manually modify the networkHarness code in order to print either the
location of the logs or the logs themselves. With this commit, tests
can now programmatically examine the logs of any node created within
the networkHarness.

It’s worth noting that at times the logs dumped may not be the most up
to date version of the logs files as the logging library employs
intermediate buffering.
2016-09-10 13:14:33 -07:00
Olaoluwa Osuntokun
d764493d25
test: fix basic funding integration test flakiness
This commit fixes some flakiness exhibited in the current basic funding
workflow tests. This test can fail occasionally in resource constrained
environment due to a race condition which arises after Alice learns of
the channel, but Bob is still waiting for Alice’s notification. As a
temporary fix, we now only check Alice’s state for the existence of the
channel.
2016-09-06 12:04:18 -07:00
Olaoluwa Osuntokun
83bf0be2cc
test: introduce a few networkHarness helper methods
This commit adds some new networkHarness helper methods which are
mean’t to reduce the verbosity of the previous basic tests, and also to
enable developers to right tests mote easily five a higher level
interface.
2016-08-31 11:59:25 -07:00
Olaoluwa Osuntokun
0511273b47
test: rename networkharness.go to networktest.go 2016-08-31 11:57:22 -07:00