@@ -38,10 +38,10 @@ type commitSweepResolver struct {
3838 // this HTLC on-chain.
3939 commitResolution lnwallet.CommitOutputResolution
4040
41- // broadcastHeight is the height that the original contract was
42- // broadcast to the main-chain at. We'll use this value to bound any
43- // historical queries to the chain for spends/confirmations.
44- broadcastHeight uint32
41+ // confirmHeight is the block height that the commitment transaction was
42+ // confirmed at. We'll use this value to bound any historical queries to
43+ // the chain for spends/confirmations.
44+ confirmHeight uint32
4545
4646 // chanPoint is the channel point of the original contract.
4747 chanPoint wire.OutPoint
@@ -74,13 +74,13 @@ type commitSweepResolver struct {
7474
7575// newCommitSweepResolver instantiates a new direct commit output resolver.
7676func newCommitSweepResolver (res lnwallet.CommitOutputResolution ,
77- broadcastHeight uint32 , chanPoint wire.OutPoint ,
77+ confirmHeight uint32 , chanPoint wire.OutPoint ,
7878 resCfg ResolverConfig ) * commitSweepResolver {
7979
8080 r := & commitSweepResolver {
8181 contractResolverKit : * newContractResolverKit (resCfg ),
8282 commitResolution : res ,
83- broadcastHeight : broadcastHeight ,
83+ confirmHeight : confirmHeight ,
8484 chanPoint : chanPoint ,
8585 }
8686
@@ -133,7 +133,7 @@ func (c *commitSweepResolver) getCommitTxConfHeight() (uint32, error) {
133133 const confDepth = 1
134134
135135 confChan , err := c .Notifier .RegisterConfirmationsNtfn (
136- & txID , pkScript , confDepth , c .broadcastHeight ,
136+ & txID , pkScript , confDepth , c .confirmHeight ,
137137 )
138138 if err != nil {
139139 return 0 , err
@@ -268,7 +268,7 @@ func (c *commitSweepResolver) Encode(w io.Writer) error {
268268 if err := binary .Write (w , endian , c .IsResolved ()); err != nil {
269269 return err
270270 }
271- if err := binary .Write (w , endian , c .broadcastHeight ); err != nil {
271+ if err := binary .Write (w , endian , c .confirmHeight ); err != nil {
272272 return err
273273 }
274274 if _ , err := w .Write (c .chanPoint .Hash [:]); err != nil {
@@ -308,7 +308,7 @@ func newCommitSweepResolverFromReader(r io.Reader, resCfg ResolverConfig) (
308308 c .markResolved ()
309309 }
310310
311- if err := binary .Read (r , endian , & c .broadcastHeight ); err != nil {
311+ if err := binary .Read (r , endian , & c .confirmHeight ); err != nil {
312312 return nil , err
313313 }
314314 _ , err := io .ReadFull (r , c .chanPoint .Hash [:])
@@ -412,7 +412,7 @@ func (c *commitSweepResolver) Launch() error {
412412 inp = input .NewCsvInputWithCltv (
413413 & c .commitResolution .SelfOutPoint , witnessType ,
414414 & c .commitResolution .SelfOutputSignDesc ,
415- c .broadcastHeight , c .commitResolution .MaturityDelay ,
415+ c .confirmHeight , c .commitResolution .MaturityDelay ,
416416 c .leaseExpiry , input .WithResolutionBlob (
417417 c .commitResolution .ResolutionBlob ,
418418 ),
@@ -421,7 +421,7 @@ func (c *commitSweepResolver) Launch() error {
421421 inp = input .NewCsvInput (
422422 & c .commitResolution .SelfOutPoint , witnessType ,
423423 & c .commitResolution .SelfOutputSignDesc ,
424- c .broadcastHeight , c .commitResolution .MaturityDelay ,
424+ c .confirmHeight , c .commitResolution .MaturityDelay ,
425425 input .WithResolutionBlob (
426426 c .commitResolution .ResolutionBlob ,
427427 ),
0 commit comments