trivial: typo fix

This commit is contained in:
ErikEk 2020-03-19 05:43:49 +01:00
parent 8a9b7595b7
commit 4e47181b99
9 changed files with 16 additions and 16 deletions

2
lnd.go

@ -118,7 +118,7 @@ func AdminAuthOptions() ([]grpc.DialOption, error) {
return opts, nil return opts, nil
} }
// ListnerWithSignal is a net.Listner that has an additional Ready channel that // ListenerWithSignal is a net.Listener that has an additional Ready channel that
// will be closed when a server starts listening. // will be closed when a server starts listening.
type ListenerWithSignal struct { type ListenerWithSignal struct {
net.Listener net.Listener

@ -27,7 +27,7 @@ type CoinSource interface {
type CoinSelectionLocker interface { type CoinSelectionLocker interface {
// WithCoinSelectLock will execute the passed function closure in a // WithCoinSelectLock will execute the passed function closure in a
// synchronized manner preventing any coin selection operations from // synchronized manner preventing any coin selection operations from
// proceeding while the closure if executing. This can be seen as the // proceeding while the closure is executing. This can be seen as the
// ability to execute a function closure under an exclusive coin // ability to execute a function closure under an exclusive coin
// selection lock. // selection lock.
WithCoinSelectLock(func() error) error WithCoinSelectLock(func() error) error

@ -1435,7 +1435,7 @@ func (l *LightningWallet) handleSingleFunderSigs(req *addSingleFunderSigsMsg) {
// WithCoinSelectLock will execute the passed function closure in a // WithCoinSelectLock will execute the passed function closure in a
// synchronized manner preventing any coin selection operations from proceeding // synchronized manner preventing any coin selection operations from proceeding
// while the closure if executing. This can be seen as the ability to execute a // while the closure is executing. This can be seen as the ability to execute a
// function closure under an exclusive coin selection lock. // function closure under an exclusive coin selection lock.
func (l *LightningWallet) WithCoinSelectLock(f func() error) error { func (l *LightningWallet) WithCoinSelectLock(f func() error) error {
l.coinSelectMtx.Lock() l.coinSelectMtx.Lock()

@ -20,7 +20,7 @@ type Wallet interface {
// WithCoinSelectLock will execute the passed function closure in a // WithCoinSelectLock will execute the passed function closure in a
// synchronized manner preventing any coin selection operations from // synchronized manner preventing any coin selection operations from
// proceeding while the closure if executing. This can be seen as the // proceeding while the closure is executing. This can be seen as the
// ability to execute a function closure under an exclusive coin // ability to execute a function closure under an exclusive coin
// selection lock. // selection lock.
WithCoinSelectLock(f func() error) error WithCoinSelectLock(f func() error) error

@ -141,7 +141,7 @@ func testStore(t *testing.T, createStore func() (SweeperStore, error)) {
t.Fatal("expected tx to be ours") t.Fatal("expected tx to be ours")
} }
// An different hash should be reported on as not being ours. // An different hash should be reported as not being ours.
var unknownHash chainhash.Hash var unknownHash chainhash.Hash
ours, err = store.IsOurTx(unknownHash) ours, err = store.IsOurTx(unknownHash)
if err != nil { if err != nil {

@ -57,7 +57,7 @@ var (
// ErrSweeperShuttingDown is an error returned when a client attempts to // ErrSweeperShuttingDown is an error returned when a client attempts to
// make a request to the UtxoSweeper, but it is unable to handle it as // make a request to the UtxoSweeper, but it is unable to handle it as
// it is/has already been stoppepd. // it is/has already been stopped.
ErrSweeperShuttingDown = errors.New("utxo sweeper shutting down") ErrSweeperShuttingDown = errors.New("utxo sweeper shutting down")
// DefaultMaxSweepAttempts specifies the default maximum number of times // DefaultMaxSweepAttempts specifies the default maximum number of times
@ -422,7 +422,7 @@ func (s *UtxoSweeper) SweepInput(input input.Input,
resultChan: make(chan Result, 1), resultChan: make(chan Result, 1),
} }
// Deliver input to main event loop. // Deliver input to the main event loop.
select { select {
case s.newInputs <- sweeperInput: case s.newInputs <- sweeperInput:
case <-s.quit: case <-s.quit:
@ -449,7 +449,7 @@ func (s *UtxoSweeper) feeRateForPreference(
} }
if feeRate < s.relayFeeRate { if feeRate < s.relayFeeRate {
return 0, fmt.Errorf("fee preference resulted in invalid fee "+ return 0, fmt.Errorf("fee preference resulted in invalid fee "+
"rate %v, mininum is %v", feeRate, s.relayFeeRate) "rate %v, minimum is %v", feeRate, s.relayFeeRate)
} }
if feeRate > s.cfg.MaxFeeRate { if feeRate > s.cfg.MaxFeeRate {
return 0, fmt.Errorf("fee preference resulted in invalid fee "+ return 0, fmt.Errorf("fee preference resulted in invalid fee "+
@ -478,7 +478,7 @@ func (s *UtxoSweeper) collector(blockEpochs <-chan *chainntnfs.BlockEpoch) {
select { select {
// A new inputs is offered to the sweeper. We check to see if we // A new inputs is offered to the sweeper. We check to see if we
// are already trying to sweep this input and if not, set up a // are already trying to sweep this input and if not, set up a
// listener for spend and schedule a sweep. // listener to spend and schedule a sweep.
case input := <-s.newInputs: case input := <-s.newInputs:
outpoint := *input.input.OutPoint() outpoint := *input.input.OutPoint()
pendInput, pending := s.pendingInputs[outpoint] pendInput, pending := s.pendingInputs[outpoint]
@ -534,7 +534,7 @@ func (s *UtxoSweeper) collector(blockEpochs <-chan *chainntnfs.BlockEpoch) {
s.testSpendChan <- *spend.SpentOutPoint s.testSpendChan <- *spend.SpentOutPoint
} }
// Query store to find out if we every published this // Query store to find out if we ever published this
// tx. // tx.
spendHash := *spend.SpenderTxHash spendHash := *spend.SpenderTxHash
isOurTx, err := s.cfg.Store.IsOurTx(spendHash) isOurTx, err := s.cfg.Store.IsOurTx(spendHash)

@ -760,7 +760,7 @@ func TestRestart(t *testing.T) {
// Expect last tx to be republished. // Expect last tx to be republished.
ctx.receiveTx() ctx.receiveTx()
// Simulate other subsystem (eg contract resolver) re-offering inputs. // Simulate other subsystem (e.g. contract resolver) re-offering inputs.
spendChan1, err := ctx.sweeper.SweepInput(input1, defaultFeePref) spendChan1, err := ctx.sweeper.SweepInput(input1, defaultFeePref)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
@ -858,7 +858,7 @@ func TestRestartRemoteSpend(t *testing.T) {
// Mine remote spending tx. // Mine remote spending tx.
ctx.backend.mine() ctx.backend.mine()
// Simulate other subsystem (eg contract resolver) re-offering input 0. // Simulate other subsystem (e.g. contract resolver) re-offering input 0.
spendChan, err := ctx.sweeper.SweepInput(input1, defaultFeePref) spendChan, err := ctx.sweeper.SweepInput(input1, defaultFeePref)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
@ -901,7 +901,7 @@ func TestRestartConfirmed(t *testing.T) {
// Mine the sweep tx. // Mine the sweep tx.
ctx.backend.mine() ctx.backend.mine()
// Simulate other subsystem (eg contract resolver) re-offering input 0. // Simulate other subsystem (e.g. contract resolver) re-offering input 0.
spendChan, err := ctx.sweeper.SweepInput(input, defaultFeePref) spendChan, err := ctx.sweeper.SweepInput(input, defaultFeePref)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)

@ -216,7 +216,7 @@ func (m *MockNotifier) RegisterSpendNtfn(outpoint *wire.OutPoint,
m.mutex.Unlock() m.mutex.Unlock()
// If output has been spent already, signal now. Do this outside the // If output has been spent already, signal now. Do this outside the
// lock to prevent a dead lock. // lock to prevent a deadlock.
if spent { if spent {
m.sendSpend(channel, outpoint, spendingTx) m.sendSpend(channel, outpoint, spendingTx)
} }

@ -112,7 +112,7 @@ type UtxoSource interface {
type CoinSelectionLocker interface { type CoinSelectionLocker interface {
// WithCoinSelectLock will execute the passed function closure in a // WithCoinSelectLock will execute the passed function closure in a
// synchronized manner preventing any coin selection operations from // synchronized manner preventing any coin selection operations from
// proceeding while the closure if executing. This can be seen as the // proceeding while the closure is executing. This can be seen as the
// ability to execute a function closure under an exclusive coin // ability to execute a function closure under an exclusive coin
// selection lock. // selection lock.
WithCoinSelectLock(func() error) error WithCoinSelectLock(func() error) error
@ -120,7 +120,7 @@ type CoinSelectionLocker interface {
// OutpointLocker allows a caller to lock/unlock an outpoint. When locked, the // OutpointLocker allows a caller to lock/unlock an outpoint. When locked, the
// outpoints shouldn't be used for any sort of channel funding of coin // outpoints shouldn't be used for any sort of channel funding of coin
// selection. Locked outpoints are not expect to be persisted between restarts. // selection. Locked outpoints are not expected to be persisted between restarts.
type OutpointLocker interface { type OutpointLocker interface {
// LockOutpoint locks a target outpoint, rendering it unusable for coin // LockOutpoint locks a target outpoint, rendering it unusable for coin
// selection. // selection.