diff --git a/addrmgr/network.go b/addrmgr/network.go index 7f30901b21..95555a69c5 100644 --- a/addrmgr/network.go +++ b/addrmgr/network.go @@ -20,7 +20,7 @@ var ( ipNet("192.168.0.0", 16, 32), } - // rfc2544Net specifies the the IPv4 block as defined by RFC2544 + // rfc2544Net specifies the IPv4 block as defined by RFC2544 // (198.18.0.0/15) rfc2544Net = ipNet("198.18.0.0", 15, 32) diff --git a/blockchain/chainio.go b/blockchain/chainio.go index e7a7c30c76..c29201c5f8 100644 --- a/blockchain/chainio.go +++ b/blockchain/chainio.go @@ -243,10 +243,10 @@ type SpentTxOut struct { // Amount is the amount of the output. Amount int64 - // PkScipt is the the public key script for the output. + // PkScipt is the public key script for the output. PkScript []byte - // Height is the height of the the block containing the creating tx. + // Height is the height of the block containing the creating tx. Height int32 // Denotes if the creating tx is a coinbase. diff --git a/blockchain/fullblocktests/generate.go b/blockchain/fullblocktests/generate.go index c491242ecd..58a53c526e 100644 --- a/blockchain/fullblocktests/generate.go +++ b/blockchain/fullblocktests/generate.go @@ -423,7 +423,7 @@ func replaceCoinbaseSigScript(script []byte) func(*wire.MsgBlock) { } // additionalTx returns a function that itself takes a block and modifies it by -// adding the the provided transaction. +// adding the provided transaction. func additionalTx(tx *wire.MsgTx) func(*wire.MsgBlock) { return func(b *wire.MsgBlock) { b.AddTransaction(tx) diff --git a/btcec/privkey.go b/btcec/privkey.go index 4efa806c5f..d0dbd8d9f9 100644 --- a/btcec/privkey.go +++ b/btcec/privkey.go @@ -9,7 +9,7 @@ import ( ) // PrivateKey wraps an ecdsa.PrivateKey as a convenience mainly for signing -// things with the the private key without having to directly import the ecdsa +// things with the private key without having to directly import the ecdsa // package. type PrivateKey = secp.PrivateKey diff --git a/btcec/pubkey.go b/btcec/pubkey.go index 7968ed042a..c4b0680a7a 100644 --- a/btcec/pubkey.go +++ b/btcec/pubkey.go @@ -19,7 +19,7 @@ const ( pubkeyHybrid byte = 0x6 // y_bit + x coord + y coord ) -// IsCompressedPubKey returns true the the passed serialized public key has +// IsCompressedPubKey returns true the passed serialized public key has // been encoded in compressed format, and false otherwise. func IsCompressedPubKey(pubKey []byte) bool { // The public key is only compressed if it is the correct length and diff --git a/btcjson/cmdparse.go b/btcjson/cmdparse.go index 4fb8dd6260..5cf3215e52 100644 --- a/btcjson/cmdparse.go +++ b/btcjson/cmdparse.go @@ -495,7 +495,7 @@ func assignField(paramNum int, fieldName string, dest reflect.Value, src reflect // by this package are already registered by default. // // The arguments are most efficient when they are the exact same type as the -// underlying field in the command struct associated with the the method, +// underlying field in the command struct associated with the method, // however this function also will perform a variety of conversions to make it // more flexible. This allows, for example, command line args which are strings // to be passed unaltered. In particular, the following conversions are diff --git a/btcjson/doc.go b/btcjson/doc.go index d31b6c0a6b..f0456716b9 100644 --- a/btcjson/doc.go +++ b/btcjson/doc.go @@ -8,7 +8,7 @@ Package btcjson provides primitives for working with the bitcoin JSON-RPC API. # Overview When communicating via the JSON-RPC protocol, all of the commands need to be -marshalled to and from the the wire in the appropriate format. This package +marshalled to and from the wire in the appropriate format. This package provides data structures and primitives to ease this process. In addition, it also provides some additional features such as custom command diff --git a/btcutil/bloom/merkleblock.go b/btcutil/bloom/merkleblock.go index 5e18682d2a..68ee477d3e 100644 --- a/btcutil/bloom/merkleblock.go +++ b/btcutil/bloom/merkleblock.go @@ -21,7 +21,7 @@ type merkleBlock struct { bits []byte } -// calcTreeWidth calculates and returns the the number of nodes (width) or a +// calcTreeWidth calculates and returns the number of nodes (width) or a // merkle tree at the given depth-first height. func (m *merkleBlock) calcTreeWidth(height uint32) uint32 { return (m.numTx + (1 << height) - 1) >> height diff --git a/cmd/btcctl/version.go b/cmd/btcctl/version.go index 42f3f7d024..8da196bea8 100644 --- a/cmd/btcctl/version.go +++ b/cmd/btcctl/version.go @@ -66,7 +66,7 @@ func normalizeVerString(str string) string { for _, r := range str { if strings.ContainsRune(semanticAlphabet, r) { // Ignoring the error here since it can only fail if - // the the system is out of memory and there are much + // the system is out of memory and there are much // bigger issues at that point. _, _ = result.WriteRune(r) } diff --git a/config.go b/config.go index 881123f5e9..2d8c67e62d 100644 --- a/config.go +++ b/config.go @@ -813,7 +813,7 @@ func loadConfig() (*config, []string, error) { return nil, nil, err } - // Validate the the minrelaytxfee. + // Validate the minrelaytxfee. cfg.minRelayTxFee, err = btcutil.NewAmount(cfg.MinRelayTxFee) if err != nil { str := "%s: invalid minrelaytxfee: %v" diff --git a/database/driver.go b/database/driver.go index 2999b61157..cb76d2fc62 100644 --- a/database/driver.go +++ b/database/driver.go @@ -62,7 +62,7 @@ func SupportedDrivers() []string { // arguments are specific to the database type driver. See the documentation // for the database driver for further details. // -// ErrDbUnknownType will be returned if the the database type is not registered. +// ErrDbUnknownType will be returned if the database type is not registered. func Create(dbType string, args ...interface{}) (DB, error) { drv, exists := drivers[dbType] if !exists { @@ -77,7 +77,7 @@ func Create(dbType string, args ...interface{}) (DB, error) { // specific to the database type driver. See the documentation for the database // driver for further details. // -// ErrDbUnknownType will be returned if the the database type is not registered. +// ErrDbUnknownType will be returned if the database type is not registered. func Open(dbType string, args ...interface{}) (DB, error) { drv, exists := drivers[dbType] if !exists { diff --git a/database/ffldb/blockio.go b/database/ffldb/blockio.go index 50e853f6dc..94d2665e03 100644 --- a/database/ffldb/blockio.go +++ b/database/ffldb/blockio.go @@ -133,7 +133,7 @@ type blockStore struct { // openBlocksLRU tracks how the open files are refenced by pushing the // most recently used files to the front of the list thereby trickling // the least recently used files to end of the list. When a file needs - // to be closed due to exceeding the the max number of allowed open + // to be closed due to exceeding the max number of allowed open // files, the one at the end of the list is closed. // // fileNumToLRUElem is a mapping between a specific block file number diff --git a/database/ffldb/db.go b/database/ffldb/db.go index c0e2bb3a6a..b796c3ae92 100644 --- a/database/ffldb/db.go +++ b/database/ffldb/db.go @@ -1015,7 +1015,7 @@ func (tx *transaction) notifyActiveIters() { tx.activeIterLock.RUnlock() } -// checkClosed returns an error if the the database or transaction is closed. +// checkClosed returns an error if the database or transaction is closed. func (tx *transaction) checkClosed() error { // The transaction is no longer valid if it has been closed. if tx.closed { diff --git a/database/ffldb/interface_test.go b/database/ffldb/interface_test.go index 58b4ab15e5..b0f275c5de 100644 --- a/database/ffldb/interface_test.go +++ b/database/ffldb/interface_test.go @@ -1212,7 +1212,7 @@ func testFetchBlockIOMissing(tc *testContext, tx database.Tx) bool { // testFetchBlockIO ensures all of the block retrieval API functions work as // expected for the provide set of blocks. The blocks must already be stored in -// the database, or at least stored into the the passed transaction. It also +// the database, or at least stored into the passed transaction. It also // tests several error conditions such as ensuring the expected errors are // returned when fetching blocks, headers, and regions that don't exist. func testFetchBlockIO(tc *testContext, tx database.Tx) bool { diff --git a/database/internal/treap/immutable_test.go b/database/internal/treap/immutable_test.go index e8952c3846..e0a1cb4af6 100644 --- a/database/internal/treap/immutable_test.go +++ b/database/internal/treap/immutable_test.go @@ -344,7 +344,7 @@ func TestImmutableDuplicatePut(t *testing.T) { testTreap = testTreap.Put(key, key) expectedSize += nodeFieldsSize + uint64(len(key)+len(key)) - // Put a duplicate key with the the expected final value. + // Put a duplicate key with the expected final value. testTreap = testTreap.Put(key, expectedVal) // Ensure the key still exists and is the new value. diff --git a/mining/mining.go b/mining/mining.go index 8ac388c263..99ef5d761d 100644 --- a/mining/mining.go +++ b/mining/mining.go @@ -42,7 +42,7 @@ type TxDesc struct { // Added is the time when the entry was added to the source pool. Added time.Time - // Height is the block height when the entry was added to the the source + // Height is the block height when the entry was added to the source // pool. Height int32 diff --git a/rpcclient/wallet.go b/rpcclient/wallet.go index b590a7963f..7b7e7212c9 100644 --- a/rpcclient/wallet.go +++ b/rpcclient/wallet.go @@ -2661,7 +2661,7 @@ func (c *Client) WalletCreateFundedPsbt( type FutureWalletProcessPsbtResult chan *Response // Receive waits for the Response promised by the future and returns an updated -// PSBT with signed inputs from the wallet and a boolen indicating if the the +// PSBT with signed inputs from the wallet and a boolen indicating if the // transaction has a complete set of signatures. func (r FutureWalletProcessPsbtResult) Receive() (*btcjson.WalletProcessPsbtResult, error) { res, err := ReceiveFuture(r) diff --git a/txscript/doc.go b/txscript/doc.go index 179cb227b3..d6eddd5a65 100644 --- a/txscript/doc.go +++ b/txscript/doc.go @@ -25,7 +25,7 @@ to right and intentionally do not provide loops. The vast majority of Bitcoin scripts at the time of this writing are of several standard forms which consist of a spender providing a public key and a signature which proves the spender owns the associated private key. This information -is used to prove the the spender is authorized to perform the transaction. +is used to prove the spender is authorized to perform the transaction. One benefit of using a scripting language is added flexibility in specifying what conditions must be met in order to spend bitcoins. diff --git a/txscript/scriptnum.go b/txscript/scriptnum.go index 0b8b50d8b2..550b01e1ff 100644 --- a/txscript/scriptnum.go +++ b/txscript/scriptnum.go @@ -197,7 +197,7 @@ func (n scriptNum) Int32() int32 { // See the Bytes function documentation for example encodings. func MakeScriptNum(v []byte, requireMinimal bool, scriptNumLen int) (scriptNum, error) { // Interpreting data requires that it is not larger than - // the the passed scriptNumLen value. + // the passed scriptNumLen value. if len(v) > scriptNumLen { str := fmt.Sprintf("numeric value encoded as %x is %d bytes "+ "which exceeds the max allowed of %d", v, len(v), diff --git a/wire/msgtx.go b/wire/msgtx.go index 3c888deb86..7705504cc8 100644 --- a/wire/msgtx.go +++ b/wire/msgtx.go @@ -292,7 +292,7 @@ func NewTxIn(prevOut *OutPoint, signatureScript []byte, witness [][]byte) *TxIn // a slice of byte slices, or a stack with one or many elements. type TxWitness [][]byte -// SerializeSize returns the number of bytes it would take to serialize the the +// SerializeSize returns the number of bytes it would take to serialize the // transaction input's witness. func (t TxWitness) SerializeSize() int { // A varint to signal the number of elements the witness has.