kvdb+cmd: fix typos

This commit is contained in:
Thabokani
2023-12-30 19:47:41 +08:00
parent 55072bfd5e
commit b8d2fc3816
7 changed files with 9 additions and 9 deletions

View File

@@ -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)
} }

View File

@@ -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.

View File

@@ -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",

View File

@@ -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."`

View File

@@ -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

View File

@@ -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
} }

View File

@@ -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"))