lnd+rpcserver: use new public server API

This commit is contained in:
Conner Fromknecht 2017-08-08 15:49:32 -07:00 committed by Olaoluwa Osuntokun
parent 56a628d3ad
commit d3dc546108
2 changed files with 4 additions and 4 deletions

4
lnd.go

@ -145,8 +145,8 @@ func lndMain() error {
return <-errChan
},
ArbiterChan: server.breachArbiter.newContracts,
SendToPeer: server.sendToPeer,
FindPeer: server.findPeer,
SendToPeer: server.SendToPeer,
FindPeer: server.FindPeer,
TempChanIDSeed: chanIDSeed,
FindChannel: func(chanID lnwire.ChannelID) (*lnwallet.LightningChannel, error) {
dbChannels, err := chanDB.FetchAllChannels()

@ -611,7 +611,7 @@ func (r *rpcServer) CloseChannel(in *lnrpc.CloseChannelRequest,
// as eligible for forwarding HTLC's. If the peer is online,
// then we'll also purge all of its indexes.
remotePub := &channel.StateSnapshot().RemoteIdentity
if peer, err := r.server.findPeer(remotePub); err == nil {
if peer, err := r.server.FindPeer(remotePub); err == nil {
// TODO(roasbeef): actually get the active channel
// instead too?
// * so only need to grab from database
@ -1108,7 +1108,7 @@ func (r *rpcServer) ListChannels(ctx context.Context,
chanID, _ = graph.ChannelID(&chanPoint)
var peerOnline bool
if _, err := r.server.findPeer(nodePub); err == nil {
if _, err := r.server.FindPeer(nodePub); err == nil {
peerOnline = true
}