Skip to content

Commit

Permalink
lnd+rpcserver: use new public server API
Browse files Browse the repository at this point in the history
  • Loading branch information
cfromknecht authored and Roasbeef committed Aug 10, 2017
1 parent 56a628d commit d3dc546
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lnd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit d3dc546

Please sign in to comment.