Skip to content

Commit f8b5cb0

Browse files
authored
Merge pull request #10395 from ffranr/backport/v0.20.x-branch-add-field-committxblockheight-to-resolutionreq
backport: lnwallet: add field `CommitTxBlockHeight` to ResolutionReq
2 parents 64e2f01 + 07003fc commit f8b5cb0

File tree

3 files changed

+177
-150
lines changed

3 files changed

+177
-150
lines changed

contractcourt/chain_watcher.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,8 @@ func (c *chainWatcher) dispatchLocalForceClose(
10611061
"detected", c.cfg.chanState.FundingOutpoint)
10621062

10631063
forceClose, err := lnwallet.NewLocalForceCloseSummary(
1064-
c.cfg.chanState, c.cfg.signer, commitSpend.SpendingTx, stateNum,
1064+
c.cfg.chanState, c.cfg.signer, commitSpend.SpendingTx,
1065+
uint32(commitSpend.SpendingHeight), stateNum,
10651066
c.cfg.auxLeafStore, c.cfg.auxResolver,
10661067
)
10671068
if err != nil {

lnwallet/aux_resolutions.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ type ResolutionReq struct {
7777
// CommitTx is the force close commitment transaction.
7878
CommitTx *wire.MsgTx
7979

80+
// CommitTxBlockHeight is the block height where the commitment
81+
// transaction confirmed. It is 0 if unknown or not confirmed yet.
82+
CommitTxBlockHeight uint32
83+
8084
// CommitFee is the fee that was paid for the commitment transaction.
8185
CommitFee btcutil.Amount
8286

0 commit comments

Comments
 (0)