lnd: update peer+fundingManager due to channeldb field rename

This commit is contained in:
Olaoluwa Osuntokun 2016-10-25 16:43:55 -07:00
parent e1d9d9c8d2
commit 290ea7ba5d
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2
2 changed files with 11 additions and 9 deletions

View File

@ -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)

View File

@ -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)