lnd: update peer+fundingManager due to channeldb field rename
This commit is contained in:
parent
e1d9d9c8d2
commit
290ea7ba5d
@ -339,7 +339,8 @@ func (f *fundingManager) handleFundingRequest(fmsg *fundingRequestMsg) {
|
|||||||
// side of a single funder workflow, we don't commit any funds to the
|
// side of a single funder workflow, we don't commit any funds to the
|
||||||
// channel ourselves.
|
// channel ourselves.
|
||||||
// TODO(roasbeef): passing num confs 1 is irrelevant here, make signed?
|
// 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 {
|
if err != nil {
|
||||||
// TODO(roasbeef): push ErrorGeneric message
|
// TODO(roasbeef): push ErrorGeneric message
|
||||||
fndgLog.Errorf("Unable to initialize reservation: %v", err)
|
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
|
// wallet, then sends a funding request to the remote peer kicking off the
|
||||||
// funding workflow.
|
// funding workflow.
|
||||||
func (f *fundingManager) handleInitFundingMsg(msg *initFundingMsg) {
|
func (f *fundingManager) handleInitFundingMsg(msg *initFundingMsg) {
|
||||||
nodeID := msg.peer.lightningID
|
var (
|
||||||
|
|
||||||
localAmt := msg.localFundingAmt
|
|
||||||
remoteAmt := msg.remoteFundingAmt
|
|
||||||
capacity := localAmt + remoteAmt
|
|
||||||
numConfs := msg.numConfs
|
|
||||||
// TODO(roasbeef): add delay
|
// 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, "+
|
fndgLog.Infof("Initiating fundingRequest(localAmt=%v, remoteAmt=%v, "+
|
||||||
"capacity=%v, numConfs=%v)", localAmt, remoteAmt, capacity, numConfs)
|
"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
|
// Fetch and then load all the active channels we have with this
|
||||||
// remote peer from the database.
|
// remote peer from the database.
|
||||||
activeChans, err := server.chanDB.FetchOpenChannels(&p.lightningID)
|
activeChans, err := server.chanDB.FetchOpenChannels(p.identityPub)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
peerLog.Errorf("unable to fetch active chans "+
|
peerLog.Errorf("unable to fetch active chans "+
|
||||||
"for peer %v: %v", p, err)
|
"for peer %v: %v", p, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user