mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-13 11:09:23 +01:00
peer+lnwallet: update API usage to recent channeldb changes
This commit is contained in:
parent
7df1d75267
commit
34959e4648
2 changed files with 22 additions and 21 deletions
|
@ -1011,12 +1011,13 @@ func (lc *LightningChannel) closeObserver(channelCloseNtfn *chainntnfs.SpendEven
|
||||||
// immediately delete the state from disk, creating a close
|
// immediately delete the state from disk, creating a close
|
||||||
// summary for future usage by related sub-systems.
|
// summary for future usage by related sub-systems.
|
||||||
// TODO(roasbeef): include HTLC's
|
// TODO(roasbeef): include HTLC's
|
||||||
|
// * and time-locked balance
|
||||||
closeSummary := &channeldb.ChannelCloseSummary{
|
closeSummary := &channeldb.ChannelCloseSummary{
|
||||||
ChanPoint: *lc.channelState.ChanID,
|
ChanPoint: *lc.channelState.ChanID,
|
||||||
ClosingTXID: *commitSpend.SpenderTxHash,
|
ClosingTXID: *commitSpend.SpenderTxHash,
|
||||||
RemotePub: lc.channelState.IdentityPub,
|
RemotePub: lc.channelState.IdentityPub,
|
||||||
Capacity: lc.Capacity,
|
Capacity: lc.Capacity,
|
||||||
OurBalance: lc.channelState.OurBalance,
|
SettledBalance: lc.channelState.OurBalance,
|
||||||
CloseType: channeldb.ForceClose,
|
CloseType: channeldb.ForceClose,
|
||||||
IsPending: true,
|
IsPending: true,
|
||||||
}
|
}
|
||||||
|
|
4
peer.go
4
peer.go
|
@ -904,7 +904,7 @@ func (p *peer) handleLocalClose(req *closeLinkReq) {
|
||||||
ClosingTXID: *closingTxid,
|
ClosingTXID: *closingTxid,
|
||||||
RemotePub: &chanInfo.RemoteIdentity,
|
RemotePub: &chanInfo.RemoteIdentity,
|
||||||
Capacity: chanInfo.Capacity,
|
Capacity: chanInfo.Capacity,
|
||||||
OurBalance: chanInfo.LocalBalance,
|
SettledBalance: chanInfo.LocalBalance,
|
||||||
CloseType: channeldb.CooperativeClose,
|
CloseType: channeldb.CooperativeClose,
|
||||||
IsPending: true,
|
IsPending: true,
|
||||||
}
|
}
|
||||||
|
@ -1029,7 +1029,7 @@ func (p *peer) handleRemoteClose(req *lnwire.CloseRequest) {
|
||||||
ClosingTXID: closeTxid,
|
ClosingTXID: closeTxid,
|
||||||
RemotePub: &chanInfo.RemoteIdentity,
|
RemotePub: &chanInfo.RemoteIdentity,
|
||||||
Capacity: chanInfo.Capacity,
|
Capacity: chanInfo.Capacity,
|
||||||
OurBalance: chanInfo.LocalBalance,
|
SettledBalance: chanInfo.LocalBalance,
|
||||||
CloseType: channeldb.CooperativeClose,
|
CloseType: channeldb.CooperativeClose,
|
||||||
IsPending: true,
|
IsPending: true,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue