Skip to content

Commit ab8e035

Browse files
committed
sweep: fix typos
1 parent 3da4093 commit ab8e035

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

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

sweep/fee_bumper_test.go

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

@@ -457,7 +457,7 @@ func TestCreateAndCheckTx(t *testing.T) {
457457
//
458458
// NOTE: we are not testing the utility of creating valid txes here, so
459459
// this is fine to be mocked. This behaves essentially as skipping the
460-
// Signer check and alaways assume the tx has a valid sig.
460+
// Signer check and always assume the tx has a valid sig.
461461
script := &input.Script{}
462462
m.signer.On("ComputeInputScript", mock.Anything,
463463
mock.Anything).Return(script, nil)
@@ -550,7 +550,7 @@ func TestCreateRBFCompliantTx(t *testing.T) {
550550
//
551551
// NOTE: we are not testing the utility of creating valid txes here, so
552552
// this is fine to be mocked. This behaves essentially as skipping the
553-
// Signer check and alaways assume the tx has a valid sig.
553+
// Signer check and always assume the tx has a valid sig.
554554
script := &input.Script{}
555555
m.signer.On("ComputeInputScript", mock.Anything,
556556
mock.Anything).Return(script, nil)
@@ -1120,9 +1120,9 @@ func TestBroadcastImmediate(t *testing.T) {
11201120
require.Empty(t, tp.subscriberChans.Len())
11211121
}
11221122

1123-
// TestCreateAnPublishFail checks all the error cases are handled properly in
1124-
// the method createAndPublish.
1125-
func TestCreateAnPublishFail(t *testing.T) {
1123+
// TestCreateAndPublishFail checks all the error cases are handled properly in
1124+
// the method createAndPublishTx.
1125+
func TestCreateAndPublishFail(t *testing.T) {
11261126
t.Parallel()
11271127

11281128
// Create a publisher using the mocks.
@@ -1152,7 +1152,7 @@ func TestCreateAnPublishFail(t *testing.T) {
11521152
//
11531153
// NOTE: we are not testing the utility of creating valid txes here, so
11541154
// this is fine to be mocked. This behaves essentially as skipping the
1155-
// Signer check and alaways assume the tx has a valid sig.
1155+
// Signer check and always assume the tx has a valid sig.
11561156
script := &input.Script{}
11571157
m.signer.On("ComputeInputScript", mock.Anything,
11581158
mock.Anything).Return(script, nil)
@@ -1190,9 +1190,9 @@ func TestCreateAnPublishFail(t *testing.T) {
11901190
require.True(t, resultOpt.IsNone())
11911191
}
11921192

1193-
// TestCreateAnPublishSuccess checks the expected result is returned from the
1194-
// method createAndPublish.
1195-
func TestCreateAnPublishSuccess(t *testing.T) {
1193+
// TestCreateAndPublishSuccess checks the expected result is returned from the
1194+
// method createAndPublishTx.
1195+
func TestCreateAndPublishSuccess(t *testing.T) {
11961196
t.Parallel()
11971197

11981198
// Create a publisher using the mocks.
@@ -1218,7 +1218,7 @@ func TestCreateAnPublishSuccess(t *testing.T) {
12181218
//
12191219
// NOTE: we are not testing the utility of creating valid txes here, so
12201220
// this is fine to be mocked. This behaves essentially as skipping the
1221-
// Signer check and alaways assume the tx has a valid sig.
1221+
// Signer check and always assume the tx has a valid sig.
12221222
script := &input.Script{}
12231223
m.signer.On("ComputeInputScript", mock.Anything,
12241224
mock.Anything).Return(script, nil)
@@ -1445,7 +1445,7 @@ func TestHandleFeeBumpTx(t *testing.T) {
14451445
//
14461446
// NOTE: we are not testing the utility of creating valid txes here, so
14471447
// this is fine to be mocked. This behaves essentially as skipping the
1448-
// Signer check and alaways assume the tx has a valid sig.
1448+
// Signer check and always assume the tx has a valid sig.
14491449
script := &input.Script{}
14501450
m.signer.On("ComputeInputScript", mock.Anything,
14511451
mock.Anything).Return(script, nil)
@@ -1830,7 +1830,7 @@ func TestHandleInitialBroadcastSuccess(t *testing.T) {
18301830
//
18311831
// NOTE: we are not testing the utility of creating valid txes here, so
18321832
// this is fine to be mocked. This behaves essentially as skipping the
1833-
// Signer check and alaways assume the tx has a valid sig.
1833+
// Signer check and always assume the tx has a valid sig.
18341834
script := &input.Script{}
18351835
m.signer.On("ComputeInputScript", mock.Anything,
18361836
mock.Anything).Return(script, nil)
@@ -1916,7 +1916,7 @@ func TestHandleInitialBroadcastFail(t *testing.T) {
19161916
//
19171917
// NOTE: we are not testing the utility of creating valid txes here, so
19181918
// this is fine to be mocked. This behaves essentially as skipping the
1919-
// Signer check and alaways assume the tx has a valid sig.
1919+
// Signer check and always assume the tx has a valid sig.
19201920
script := &input.Script{}
19211921
m.signer.On("ComputeInputScript", mock.Anything,
19221922
mock.Anything).Return(script, nil)

0 commit comments

Comments
 (0)