htlcswitch+server: add new field SelfKey to htlcswitch.Config

This commit adds a new field to the switch’s Config, namely the public
key of the backing lightning node. This field will soon be used to
return more detailed errors messages back to the ChannelRouter itself.
This commit is contained in:
Olaoluwa Osuntokun
2017-10-16 18:39:06 -07:00
parent 51d04e8922
commit 61be23dc31
2 changed files with 9 additions and 2 deletions

View File

@@ -176,6 +176,7 @@ func newServer(listenAddrs []string, chanDB *channeldb.DB, cc *chainControl,
}
s.htlcSwitch = htlcswitch.New(htlcswitch.Config{
SelfKey: s.identityPriv.PubKey(),
LocalChannelClose: func(pubKey []byte,
request *htlcswitch.ChanClose) {