From d3dc54610865b6291e3c67ce0b5c351d27b8dc37 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Tue, 8 Aug 2017 15:49:32 -0700 Subject: [PATCH] lnd+rpcserver: use new public server API --- lnd.go | 4 ++-- rpcserver.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lnd.go b/lnd.go index c9bc92347c..5d5606d855 100644 --- a/lnd.go +++ b/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() diff --git a/rpcserver.go b/rpcserver.go index 684dfafcee..fdd00f4df6 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -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 }