multi: remove repetitive the

Signed-off-by: cui fliter <imcusg@gmail.com>
This commit is contained in:
cui fliter 2023-06-26 11:14:15 +08:00
parent 7fd5c1e92c
commit e160bb6922
20 changed files with 22 additions and 22 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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