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
View File

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

View File

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