Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi: remove repetitive the #1998

Merged
merged 1 commit into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addrmgr/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions blockchain/chainio.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion blockchain/fullblocktests/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion btcec/privkey.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion btcec/pubkey.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion btcjson/cmdparse.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion btcjson/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion btcutil/bloom/merkleblock.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cmd/btcctl/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions database/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion database/ffldb/blockio.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion database/ffldb/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion database/ffldb/interface_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion database/internal/treap/immutable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion mining/mining.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion rpcclient/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion txscript/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion txscript/scriptnum.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion wire/msgtx.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down