mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-01 10:11:11 +02:00
Merge pull request #8325 from Thabokani/master
chore: fix typos [skip ci]
This commit is contained in:
@@ -453,7 +453,7 @@ func constrainMacaroon(ctx *cli.Context) error {
|
|||||||
// add first-party caveats (if necessary) to it.
|
// add first-party caveats (if necessary) to it.
|
||||||
sourceMac := &macaroon.Macaroon{}
|
sourceMac := &macaroon.Macaroon{}
|
||||||
if err = sourceMac.UnmarshalBinary(sourceMacBytes); err != nil {
|
if err = sourceMac.UnmarshalBinary(sourceMacBytes); err != nil {
|
||||||
return fmt.Errorf("error unmarshaling source macaroon file "+
|
return fmt.Errorf("error unmarshalling source macaroon file "+
|
||||||
"%s: %v", sourceMacFile, err)
|
"%s: %v", sourceMacFile, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -38,7 +38,7 @@ func getPeersClient(ctx *cli.Context) (peersrpc.PeersClient, func()) {
|
|||||||
var updateNodeAnnouncementCommand = cli.Command{
|
var updateNodeAnnouncementCommand = cli.Command{
|
||||||
Name: "updatenodeannouncement",
|
Name: "updatenodeannouncement",
|
||||||
Category: "Peers",
|
Category: "Peers",
|
||||||
Usage: "update and brodcast a new node announcement",
|
Usage: "update and broadcast a new node announcement",
|
||||||
Description: `
|
Description: `
|
||||||
Update the node's information and broadcast a new node announcement.
|
Update the node's information and broadcast a new node announcement.
|
||||||
|
|
||||||
|
@@ -1298,8 +1298,8 @@ var listAddressesCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "account_name",
|
Name: "account_name",
|
||||||
Usage: "(optional) only addreses matching this account " +
|
Usage: "(optional) only addresses matching this " +
|
||||||
"are returned",
|
"account are returned",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "show_custom_accounts",
|
Name: "show_custom_accounts",
|
||||||
|
@@ -35,7 +35,7 @@ const (
|
|||||||
|
|
||||||
// BoltConfig holds bolt configuration.
|
// BoltConfig holds bolt configuration.
|
||||||
type BoltConfig struct {
|
type BoltConfig struct {
|
||||||
NoFreelistSync bool `long:"nofreelistsync" description:"Whether the databases used within lnd should sync their freelist to disk. This is set to true by default, meaning we don't sync the free-list resulting in imporved memory performance during operation, but with an increase in startup time."`
|
NoFreelistSync bool `long:"nofreelistsync" description:"Whether the databases used within lnd should sync their freelist to disk. This is set to true by default, meaning we don't sync the free-list resulting in improved memory performance during operation, but with an increase in startup time."`
|
||||||
|
|
||||||
AutoCompact bool `long:"auto-compact" description:"Whether the databases used within lnd should automatically be compacted on every startup (and if the database has the configured minimum age). This is disabled by default because it requires additional disk space to be available during the compaction that is freed afterwards. In general compaction leads to smaller database files."`
|
AutoCompact bool `long:"auto-compact" description:"Whether the databases used within lnd should automatically be compacted on every startup (and if the database has the configured minimum age). This is disabled by default because it requires additional disk space to be available during the compaction that is freed afterwards. In general compaction leads to smaller database files."`
|
||||||
|
|
||||||
|
@@ -14,8 +14,8 @@ import (
|
|||||||
// retried. When a new transaction is added to the queue, we first upgrade the
|
// retried. When a new transaction is added to the queue, we first upgrade the
|
||||||
// read/write counts in the queue's own accounting to decide whether the new
|
// read/write counts in the queue's own accounting to decide whether the new
|
||||||
// transaction has any conflicting dependencies. If the transaction does not
|
// transaction has any conflicting dependencies. If the transaction does not
|
||||||
// conflict with any other, then it is comitted immediately, otherwise it'll be
|
// conflict with any other, then it is committed immediately, otherwise it'll be
|
||||||
// queued up for later exection.
|
// queued up for later execution.
|
||||||
// The algorithm is described in: http://www.cs.umd.edu/~abadi/papers/vll-vldb13.pdf
|
// The algorithm is described in: http://www.cs.umd.edu/~abadi/papers/vll-vldb13.pdf
|
||||||
type commitQueue struct {
|
type commitQueue struct {
|
||||||
ctx context.Context
|
ctx context.Context
|
||||||
|
@@ -63,7 +63,7 @@ func (tx *readWriteTx) ForEachBucket(fn func(key []byte) error) error {
|
|||||||
return root.ForEach(func(key []byte, val []byte) error {
|
return root.ForEach(func(key []byte, val []byte) error {
|
||||||
if val != nil {
|
if val != nil {
|
||||||
// A non-nil value would mean that we have a non
|
// A non-nil value would mean that we have a non
|
||||||
// walletdb/kvdb compatibel database containing
|
// walletdb/kvdb compatible database containing
|
||||||
// arbitrary key/values.
|
// arbitrary key/values.
|
||||||
return walletdb.ErrInvalid
|
return walletdb.ErrInvalid
|
||||||
}
|
}
|
||||||
|
@@ -380,7 +380,7 @@ func testKeyClash(t *testing.T, db walletdb.DB) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TestBucketCreateDelete tests that creating then deleting then creating a
|
// TestBucketCreateDelete tests that creating then deleting then creating a
|
||||||
// bucket suceeds.
|
// bucket succeeds.
|
||||||
func testBucketCreateDelete(t *testing.T, db walletdb.DB) {
|
func testBucketCreateDelete(t *testing.T, db walletdb.DB) {
|
||||||
err := Update(db, func(tx walletdb.ReadWriteTx) error {
|
err := Update(db, func(tx walletdb.ReadWriteTx) error {
|
||||||
apple, err := tx.CreateTopLevelBucket([]byte("apple"))
|
apple, err := tx.CreateTopLevelBucket([]byte("apple"))
|
||||||
|
@@ -175,7 +175,7 @@ func (h *HarnessTest) Context() context.Context {
|
|||||||
// node's wallets will be funded wallets with 10x10 BTC outputs each.
|
// node's wallets will be funded wallets with 10x10 BTC outputs each.
|
||||||
func (h *HarnessTest) SetupStandbyNodes() {
|
func (h *HarnessTest) SetupStandbyNodes() {
|
||||||
h.Log("Setting up standby nodes Alice and Bob...")
|
h.Log("Setting up standby nodes Alice and Bob...")
|
||||||
defer h.Log("Finshed the setup, now running tests...")
|
defer h.Log("Finished the setup, now running tests...")
|
||||||
|
|
||||||
lndArgs := []string{
|
lndArgs := []string{
|
||||||
"--default-remote-max-htlcs=483",
|
"--default-remote-max-htlcs=483",
|
||||||
|
@@ -12,7 +12,7 @@ import (
|
|||||||
"github.com/lightningnetwork/lnd/lntest/wait"
|
"github.com/lightningnetwork/lnd/lntest/wait"
|
||||||
)
|
)
|
||||||
|
|
||||||
// nodeManager is responsible for hanlding the start and stop of a given node.
|
// nodeManager is responsible for handling the start and stop of a given node.
|
||||||
// It also keeps track of the running nodes.
|
// It also keeps track of the running nodes.
|
||||||
type nodeManager struct {
|
type nodeManager struct {
|
||||||
sync.Mutex
|
sync.Mutex
|
||||||
|
@@ -2420,7 +2420,7 @@ func TestClusterByLockTime(t *testing.T) {
|
|||||||
remainingInputs,
|
remainingInputs,
|
||||||
)
|
)
|
||||||
|
|
||||||
// Assert the mocked methods are called as expeceted.
|
// Assert the mocked methods are called as expected.
|
||||||
input1LockTime1.AssertExpectations(t)
|
input1LockTime1.AssertExpectations(t)
|
||||||
input2LockTime1.AssertExpectations(t)
|
input2LockTime1.AssertExpectations(t)
|
||||||
input3LockTime2.AssertExpectations(t)
|
input3LockTime2.AssertExpectations(t)
|
||||||
|
@@ -186,7 +186,7 @@ func createSweepTx(inputs []input.Input, outputs []*wire.TxOut,
|
|||||||
|
|
||||||
if lt, ok := o.RequiredLockTime(); ok {
|
if lt, ok := o.RequiredLockTime(); ok {
|
||||||
// If another input commits to a different locktime,
|
// If another input commits to a different locktime,
|
||||||
// they cannot be combined in the same transcation.
|
// they cannot be combined in the same transaction.
|
||||||
if locktime != -1 && locktime != int32(lt) {
|
if locktime != -1 && locktime != int32(lt) {
|
||||||
return nil, fmt.Errorf("incompatible locktime")
|
return nil, fmt.Errorf("incompatible locktime")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user