mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 22:25:24 +01:00
lnd: update peer+fundingManager due to channeldb field rename
This commit is contained in:
parent
e1d9d9c8d2
commit
290ea7ba5d
2 changed files with 11 additions and 9 deletions
|
@ -339,7 +339,8 @@ func (f *fundingManager) handleFundingRequest(fmsg *fundingRequestMsg) {
|
|||
// side of a single funder workflow, we don't commit any funds to the
|
||||
// channel ourselves.
|
||||
// TODO(roasbeef): passing num confs 1 is irrelevant here, make signed?
|
||||
reservation, err := f.wallet.InitChannelReservation(amt, 0, fmsg.peer.lightningID, 1, delay)
|
||||
reservation, err := f.wallet.InitChannelReservation(amt, 0,
|
||||
fmsg.peer.identityPub, 1, delay)
|
||||
if err != nil {
|
||||
// TODO(roasbeef): push ErrorGeneric message
|
||||
fndgLog.Errorf("Unable to initialize reservation: %v", err)
|
||||
|
@ -712,13 +713,14 @@ func (f *fundingManager) initFundingWorkflow(targetPeer *peer, req *openChanReq)
|
|||
// wallet, then sends a funding request to the remote peer kicking off the
|
||||
// funding workflow.
|
||||
func (f *fundingManager) handleInitFundingMsg(msg *initFundingMsg) {
|
||||
nodeID := msg.peer.lightningID
|
||||
|
||||
localAmt := msg.localFundingAmt
|
||||
remoteAmt := msg.remoteFundingAmt
|
||||
capacity := localAmt + remoteAmt
|
||||
numConfs := msg.numConfs
|
||||
// TODO(roasbeef): add delay
|
||||
var (
|
||||
// TODO(roasbeef): add delay
|
||||
nodeID = msg.peer.identityPub
|
||||
localAmt = msg.localFundingAmt
|
||||
remoteAmt = msg.remoteFundingAmt
|
||||
capacity = localAmt + remoteAmt
|
||||
numConfs = msg.numConfs
|
||||
)
|
||||
|
||||
fndgLog.Infof("Initiating fundingRequest(localAmt=%v, remoteAmt=%v, "+
|
||||
"capacity=%v, numConfs=%v)", localAmt, remoteAmt, capacity, numConfs)
|
||||
|
|
2
peer.go
2
peer.go
|
@ -204,7 +204,7 @@ func newPeer(conn net.Conn, server *server, btcNet wire.BitcoinNet, inbound bool
|
|||
|
||||
// Fetch and then load all the active channels we have with this
|
||||
// remote peer from the database.
|
||||
activeChans, err := server.chanDB.FetchOpenChannels(&p.lightningID)
|
||||
activeChans, err := server.chanDB.FetchOpenChannels(p.identityPub)
|
||||
if err != nil {
|
||||
peerLog.Errorf("unable to fetch active chans "+
|
||||
"for peer %v: %v", p, err)
|
||||
|
|
Loading…
Add table
Reference in a new issue