Skip to content

Commit 04dc199

Browse files
committed
sweep: fix typos
1 parent e56cc0f commit 04dc199

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

sweep/fee_bumper.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ const (
111111
// error, which means they cannot be retried with increased budget.
112112
TxFatal
113113

114-
// sentinalEvent is used to check if an event is unknown.
115-
sentinalEvent
114+
// sentinelEvent is used to check if an event is unknown.
115+
sentinelEvent
116116
)
117117

118118
// String returns a human-readable string for the event.
@@ -137,13 +137,13 @@ func (e BumpEvent) String() string {
137137

138138
// Unknown returns true if the event is unknown.
139139
func (e BumpEvent) Unknown() bool {
140-
return e >= sentinalEvent
140+
return e >= sentinelEvent
141141
}
142142

143143
// BumpRequest is used by the caller to give the Bumper the necessary info to
144144
// create and manage potential fee bumps for a set of inputs.
145145
type BumpRequest struct {
146-
// Budget givens the total amount that can be used as fees by these
146+
// Budget gives the total amount that can be used as fees by these
147147
// inputs.
148148
Budget btcutil.Amount
149149

@@ -593,7 +593,7 @@ func (t *TxPublisher) createRBFCompliantTx(
593593
// used up the budget, we will return an error
594594
// indicating this tx cannot be made. The
595595
// sweeper should handle this error and try to
596-
// cluster these inputs differetly.
596+
// cluster these inputs differently.
597597
increased, err = f.Increment()
598598
if err != nil {
599599
return nil, err
@@ -1336,7 +1336,7 @@ func (t *TxPublisher) createAndPublishTx(
13361336
// the fee bumper retry it at next block.
13371337
//
13381338
// NOTE: we may get this error if we've bypassed the mempool check,
1339-
// which means we are suing neutrino backend.
1339+
// which means we are using neutrino backend.
13401340
if errors.Is(result.Err, chain.ErrInsufficientFee) ||
13411341
errors.Is(result.Err, lnwallet.ErrMempoolFee) {
13421342

sweep/fee_bumper_test.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func TestBumpResultValidate(t *testing.T) {
7474
// Unknown event type will give an error.
7575
b = BumpResult{
7676
Tx: &wire.MsgTx{},
77-
Event: sentinalEvent,
77+
Event: sentinelEvent,
7878
}
7979
require.ErrorIs(t, b.Validate(), ErrInvalidBumpResult)
8080

@@ -465,7 +465,7 @@ func TestCreateAndCheckTx(t *testing.T) {
465465
//
466466
// NOTE: we are not testing the utility of creating valid txes here, so
467467
// this is fine to be mocked. This behaves essentially as skipping the
468-
// Signer check and alaways assume the tx has a valid sig.
468+
// Signer check and always assume the tx has a valid sig.
469469
script := &input.Script{}
470470
m.signer.On("ComputeInputScript", mock.Anything,
471471
mock.Anything).Return(script, nil)
@@ -558,7 +558,7 @@ func TestCreateRBFCompliantTx(t *testing.T) {
558558
//
559559
// NOTE: we are not testing the utility of creating valid txes here, so
560560
// this is fine to be mocked. This behaves essentially as skipping the
561-
// Signer check and alaways assume the tx has a valid sig.
561+
// Signer check and always assume the tx has a valid sig.
562562
script := &input.Script{}
563563
m.signer.On("ComputeInputScript", mock.Anything,
564564
mock.Anything).Return(script, nil)
@@ -1128,9 +1128,9 @@ func TestBroadcastImmediate(t *testing.T) {
11281128
require.Empty(t, tp.subscriberChans.Len())
11291129
}
11301130

1131-
// TestCreateAnPublishFail checks all the error cases are handled properly in
1132-
// the method createAndPublish.
1133-
func TestCreateAnPublishFail(t *testing.T) {
1131+
// TestCreateAndPublishFail checks all the error cases are handled properly in
1132+
// the method createAndPublishTx.
1133+
func TestCreateAndPublishFail(t *testing.T) {
11341134
t.Parallel()
11351135

11361136
// Create a publisher using the mocks.
@@ -1160,7 +1160,7 @@ func TestCreateAnPublishFail(t *testing.T) {
11601160
//
11611161
// NOTE: we are not testing the utility of creating valid txes here, so
11621162
// this is fine to be mocked. This behaves essentially as skipping the
1163-
// Signer check and alaways assume the tx has a valid sig.
1163+
// Signer check and always assume the tx has a valid sig.
11641164
script := &input.Script{}
11651165
m.signer.On("ComputeInputScript", mock.Anything,
11661166
mock.Anything).Return(script, nil)
@@ -1198,9 +1198,9 @@ func TestCreateAnPublishFail(t *testing.T) {
11981198
require.True(t, resultOpt.IsNone())
11991199
}
12001200

1201-
// TestCreateAnPublishSuccess checks the expected result is returned from the
1202-
// method createAndPublish.
1203-
func TestCreateAnPublishSuccess(t *testing.T) {
1201+
// TestCreateAndPublishSuccess checks the expected result is returned from the
1202+
// method createAndPublishTx.
1203+
func TestCreateAndPublishSuccess(t *testing.T) {
12041204
t.Parallel()
12051205

12061206
// Create a publisher using the mocks.
@@ -1226,7 +1226,7 @@ func TestCreateAnPublishSuccess(t *testing.T) {
12261226
//
12271227
// NOTE: we are not testing the utility of creating valid txes here, so
12281228
// this is fine to be mocked. This behaves essentially as skipping the
1229-
// Signer check and alaways assume the tx has a valid sig.
1229+
// Signer check and always assume the tx has a valid sig.
12301230
script := &input.Script{}
12311231
m.signer.On("ComputeInputScript", mock.Anything,
12321232
mock.Anything).Return(script, nil)
@@ -1453,7 +1453,7 @@ func TestHandleFeeBumpTx(t *testing.T) {
14531453
//
14541454
// NOTE: we are not testing the utility of creating valid txes here, so
14551455
// this is fine to be mocked. This behaves essentially as skipping the
1456-
// Signer check and alaways assume the tx has a valid sig.
1456+
// Signer check and always assume the tx has a valid sig.
14571457
script := &input.Script{}
14581458
m.signer.On("ComputeInputScript", mock.Anything,
14591459
mock.Anything).Return(script, nil)
@@ -1850,7 +1850,7 @@ func TestHandleInitialBroadcastSuccess(t *testing.T) {
18501850
//
18511851
// NOTE: we are not testing the utility of creating valid txes here, so
18521852
// this is fine to be mocked. This behaves essentially as skipping the
1853-
// Signer check and alaways assume the tx has a valid sig.
1853+
// Signer check and always assume the tx has a valid sig.
18541854
script := &input.Script{}
18551855
m.signer.On("ComputeInputScript", mock.Anything,
18561856
mock.Anything).Return(script, nil)
@@ -1936,7 +1936,7 @@ func TestHandleInitialBroadcastFail(t *testing.T) {
19361936
//
19371937
// NOTE: we are not testing the utility of creating valid txes here, so
19381938
// this is fine to be mocked. This behaves essentially as skipping the
1939-
// Signer check and alaways assume the tx has a valid sig.
1939+
// Signer check and always assume the tx has a valid sig.
19401940
script := &input.Script{}
19411941
m.signer.On("ComputeInputScript", mock.Anything,
19421942
mock.Anything).Return(script, nil)

0 commit comments

Comments
 (0)