sweep: rename waitForSpend to monitorSpend to avoid confusion
The method `waitForSpend` makes it sounding like it's blocking while it's not, thus it's renamed to avoid confusion.
This commit is contained in:
1 file changed
+3
-3
+3
-3
@@ -1348,9 +1348,9 @@ func (s *UtxoSweeper) sweep(inputs inputSet, feeRate chainfee.SatPerKWeight,
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// waitForSpend registers a spend notification with the chain notifier. It
|
// monitorSpend registers a spend notification with the chain notifier. It
|
||||||
// returns a cancel function that can be used to cancel the registration.
|
// returns a cancel function that can be used to cancel the registration.
|
||||||
func (s *UtxoSweeper) waitForSpend(outpoint wire.OutPoint,
|
func (s *UtxoSweeper) monitorSpend(outpoint wire.OutPoint,
|
||||||
script []byte, heightHint uint32) (func(), error) {
|
script []byte, heightHint uint32) (func(), error) {
|
||||||
|
|
||||||
log.Tracef("Wait for spend of %v at heightHint=%v",
|
log.Tracef("Wait for spend of %v at heightHint=%v",
|
||||||
@@ -1611,7 +1611,7 @@ func (s *UtxoSweeper) handleNewInput(input *sweepInputMessage,
|
|||||||
|
|
||||||
// Start watching for spend of this input, either by us or the remote
|
// Start watching for spend of this input, either by us or the remote
|
||||||
// party.
|
// party.
|
||||||
cancel, err := s.waitForSpend(
|
cancel, err := s.monitorSpend(
|
||||||
outpoint, input.input.SignDesc().Output.PkScript,
|
outpoint, input.input.SignDesc().Output.PkScript,
|
||||||
input.input.HeightHint(),
|
input.input.HeightHint(),
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in new issue
Block a user