test: add async txn seen notifications to network harness

This commit adds a new feature to the network harness enabling callers
to receive async notifications once a particular transaction is seen on
the network. Such a feature is useful when due to the asynchronous
behavior of node communications.

With this new feature, tests can now wait for a particular transaction
to be seen within the network before proceeding.
This commit is contained in:
Olaoluwa Osuntokun
2016-08-30 19:34:13 -07:00
parent 9eb2a4219f
commit 95380fee1b
3 changed files with 109 additions and 25 deletions

View File

@@ -270,6 +270,8 @@ out:
"ChannelPoint(%v): %v", targetChannelPoint, err)
return err
case closingUpdate := <-updateChan:
rpcsLog.Tracef("[closechannel] sending update: %v",
closingUpdate)
if err := updateStream.Send(closingUpdate); err != nil {
return err
}