Skip to content

Commit c746aee

Browse files
authored
Merge pull request #10391 from ffranr/wip/add-field-committxblockheight-to-resolutionreq
lnwallet: add field `CommitTxBlockHeight` to `ResolutionReq`
2 parents 7e70e3d + 3d2b0d7 commit c746aee

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)