mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 01:43:16 +01:00
lnd+rpcserver: use new public server API
This commit is contained in:
parent
56a628d3ad
commit
d3dc546108
4
lnd.go
4
lnd.go
@ -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()
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user