Skip to content

Commit 5502d91

Browse files
committed
sweep: fix typos
1 parent 96a6857 commit 5502d91

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
@@ -112,8 +112,8 @@ const (
112112
// error, which means they cannot be retried with increased budget.
113113
TxFatal
114114

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

119119
// String returns a human-readable string for the event.
@@ -138,13 +138,13 @@ func (e BumpEvent) String() string {
138138

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

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

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

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)
@@ -1854,7 +1854,7 @@ func TestHandleInitialBroadcastSuccess(t *testing.T) {
18541854
//
18551855
// NOTE: we are not testing the utility of creating valid txes here, so
18561856
// this is fine to be mocked. This behaves essentially as skipping the
1857-
// Signer check and alaways assume the tx has a valid sig.
1857+
// Signer check and always assume the tx has a valid sig.
18581858
script := &input.Script{}
18591859
m.signer.On("ComputeInputScript", mock.Anything,
18601860
mock.Anything).Return(script, nil)
@@ -1940,7 +1940,7 @@ func TestHandleInitialBroadcastFail(t *testing.T) {
19401940
//
19411941
// NOTE: we are not testing the utility of creating valid txes here, so
19421942
// this is fine to be mocked. This behaves essentially as skipping the
1943-
// Signer check and alaways assume the tx has a valid sig.
1943+
// Signer check and always assume the tx has a valid sig.
19441944
script := &input.Script{}
19451945
m.signer.On("ComputeInputScript", mock.Anything,
19461946
mock.Anything).Return(script, nil)

0 commit comments

Comments
 (0)