From 11fcd83963ab0ecd1b84b429b1efc1d2cdc6d5c5 Mon Sep 17 00:00:00 2001 From: Nicola 'tekNico' Larosa Date: Sun, 29 Oct 2017 20:56:03 +0100 Subject: [PATCH] btcd/multi: fix a number of typos in comments. --- CHANGES | 4 ++-- README.md | 2 +- blockchain/chainview_test.go | 2 +- blockchain/fullblocktests/README.md | 2 +- blockchain/fullblocktests/doc.go | 2 +- blockchain/indexers/addrindex.go | 4 ++-- blockchain/indexers/txindex.go | 2 +- blockchain/mediantime_test.go | 2 +- blockchain/thresholdstate.go | 2 +- blockchain/validate.go | 2 +- blockchain/weight.go | 2 +- btcd.go | 6 +++--- btcec/signature.go | 2 +- btcjson/cmdinfo_test.go | 2 +- btcjson/cmdparse.go | 2 +- btcjson/register_test.go | 2 +- btcjson/walletsvrwsntfns.go | 2 +- chaincfg/params.go | 4 ++-- integration/csv_fork_test.go | 4 ++-- mempool/README.md | 2 +- mempool/doc.go | 2 +- mempool/mempool_test.go | 2 +- mining/mining.go | 4 ++-- rpcclient/extensions.go | 2 +- rpcclient/infrastructure.go | 2 +- rpcclient/notify.go | 2 +- rpcclient/wallet.go | 4 ++-- rpcserverhelp.go | 6 +++--- sample-btcd.conf | 2 +- server.go | 2 +- txscript/script.go | 4 ++-- txscript/standard_test.go | 6 +++--- wire/common.go | 4 ++-- wire/msggetdata_test.go | 2 +- wire/msginv_test.go | 2 +- wire/msgmerkleblock_test.go | 2 +- wire/msgnotfound_test.go | 2 +- wire/msgtx.go | 2 +- 38 files changed, 52 insertions(+), 52 deletions(-) diff --git a/CHANGES b/CHANGES index 99b2fc13..6f7013e9 100644 --- a/CHANGES +++ b/CHANGES @@ -570,8 +570,8 @@ Changes in 0.8.0-beta (Sun May 25 2014) - btcctl utility changes: - Add createencryptedwallet command - Add getblockchaininfo command - - Add importwallet commmand - - Add addmultisigaddress commmand + - Add importwallet command + - Add addmultisigaddress command - Add setgenerate command - Accept --testnet and --wallet flags which automatically select the appropriate port and TLS certificates needed to communicate diff --git a/README.md b/README.md index 0e8152a2..72e73a55 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ $ go install . ./cmd/... ## Getting Started -btcd has several configuration options avilable to tweak how it runs, but all +btcd has several configuration options available to tweak how it runs, but all of the basic operations described in the intro section work with zero configuration. diff --git a/blockchain/chainview_test.go b/blockchain/chainview_test.go index 964da607..760d31ab 100644 --- a/blockchain/chainview_test.go +++ b/blockchain/chainview_test.go @@ -74,7 +74,7 @@ func zipLocators(locators ...BlockLocator) BlockLocator { } // TestChainView ensures all of the exported functionality of chain views works -// as intended with the expection of some special cases which are handled in +// as intended with the exception of some special cases which are handled in // other tests. func TestChainView(t *testing.T) { // Construct a synthetic block index consisting of the following diff --git a/blockchain/fullblocktests/README.md b/blockchain/fullblocktests/README.md index 1caca027..41f4b934 100644 --- a/blockchain/fullblocktests/README.md +++ b/blockchain/fullblocktests/README.md @@ -15,7 +15,7 @@ independent versions over the peer-to-peer network. This package has intentionally been designed so it can be used as a standalone package for any projects needing to test their implementation against a full set -of blocks that excerise the consensus validation rules. +of blocks that exercise the consensus validation rules. ## Installation and Updating diff --git a/blockchain/fullblocktests/doc.go b/blockchain/fullblocktests/doc.go index 83b9c115..bfedc43d 100644 --- a/blockchain/fullblocktests/doc.go +++ b/blockchain/fullblocktests/doc.go @@ -15,6 +15,6 @@ independent versions over the peer-to-peer network. This package has intentionally been designed so it can be used as a standalone package for any projects needing to test their implementation against a full set -of blocks that excerise the consensus validation rules. +of blocks that exercise the consensus validation rules. */ package fullblocktests diff --git a/blockchain/indexers/addrindex.go b/blockchain/indexers/addrindex.go index d512c32f..c9fee91c 100644 --- a/blockchain/indexers/addrindex.go +++ b/blockchain/indexers/addrindex.go @@ -651,7 +651,7 @@ func (idx *AddrIndex) Create(dbTx database.Tx) error { } // writeIndexData represents the address index data to be written for one block. -// It consistens of the address mapped to an ordered list of the transactions +// It consists of the address mapped to an ordered list of the transactions // that involve the address in block. It is ordered so the transactions can be // stored in the order they appear in the block. type writeIndexData map[[addrKeySize]byte][]int @@ -690,7 +690,7 @@ func (idx *AddrIndex) indexPkScript(data writeIndexData, pkScript []byte, txIdx } // indexBlock extract all of the standard addresses from all of the transactions -// in the passed block and maps each of them to the assocaited transaction using +// in the passed block and maps each of them to the associated transaction using // the passed map. func (idx *AddrIndex) indexBlock(data writeIndexData, block *btcutil.Block, view *blockchain.UtxoViewpoint) { for txIdx, tx := range block.Transactions() { diff --git a/blockchain/indexers/txindex.go b/blockchain/indexers/txindex.go index 9b1826cc..51fad698 100644 --- a/blockchain/indexers/txindex.go +++ b/blockchain/indexers/txindex.go @@ -40,7 +40,7 @@ var ( // ----------------------------------------------------------------------------- // The transaction index consists of an entry for every transaction in the main -// chain. In order to significanly optimize the space requirements a separate +// chain. In order to significantly optimize the space requirements a separate // index which provides an internal mapping between each block that has been // indexed and a unique ID for use within the hash to location mappings. The ID // is simply a sequentially incremented uint32. This is useful because it is diff --git a/blockchain/mediantime_test.go b/blockchain/mediantime_test.go index f5d74a75..948d0310 100644 --- a/blockchain/mediantime_test.go +++ b/blockchain/mediantime_test.go @@ -45,7 +45,7 @@ func TestMedianTime(t *testing.T) { // be ignored. {in: []int64{-4201, 4202, -4203, 4204, -4205}, wantOffset: 0}, - // Excerise the condition where the median offset is greater + // Exercise the condition where the median offset is greater // than the max allowed adjustment, but there is at least one // sample that is close enough to the current time to avoid // triggering a warning about an invalid local clock. diff --git a/blockchain/thresholdstate.go b/blockchain/thresholdstate.go index b9f39294..35a76255 100644 --- a/blockchain/thresholdstate.go +++ b/blockchain/thresholdstate.go @@ -85,7 +85,7 @@ type thresholdConditionChecker interface { // Condition returns whether or not the rule change activation condition // has been met. This typically involves checking whether or not the - // bit assocaited with the condition is set, but can be more complex as + // bit associated with the condition is set, but can be more complex as // needed. Condition(*blockNode) (bool, error) } diff --git a/blockchain/validate.go b/blockchain/validate.go index 1e966049..27f04f6e 100644 --- a/blockchain/validate.go +++ b/blockchain/validate.go @@ -791,7 +791,7 @@ func (b *BlockChain) checkBlockContext(block *btcutil.Block, prevNode *blockNode } // If segwit is active, then we'll need to fully validate the - // new witness commitment for adherance to the rules. + // new witness commitment for adherence to the rules. if segwitState == ThresholdActive { // Validate the witness commitment (if any) within the // block. This involves asserting that if the coinbase diff --git a/blockchain/weight.go b/blockchain/weight.go index 286a9197..80de012f 100644 --- a/blockchain/weight.go +++ b/blockchain/weight.go @@ -27,7 +27,7 @@ const ( // MaxBlockSigOpsCost is the maximum number of signature operations // allowed for a block. It is calculated via a weighted algorithm which - // weights segragated witness sig ops lower than regular sig ops. + // weights segregated witness sig ops lower than regular sig ops. MaxBlockSigOpsCost = 80000 // WitnessScaleFactor determines the level of "discount" witness data diff --git a/btcd.go b/btcd.go index 2395974b..b656e1b3 100644 --- a/btcd.go +++ b/btcd.go @@ -202,10 +202,10 @@ func blockDbPath(dbType string) string { return dbPath } -// warnMultipeDBs shows a warning if multiple block database types are detected. +// warnMultipleDBs shows a warning if multiple block database types are detected. // This is not a situation most users want. It is handy for development however // to support multiple side-by-side databases. -func warnMultipeDBs() { +func warnMultipleDBs() { // This is intentionally not using the known db types which depend // on the database types compiled into the binary since we want to // detect legacy db types as well. @@ -253,7 +253,7 @@ func loadBlockDB() (database.DB, error) { return db, nil } - warnMultipeDBs() + warnMultipleDBs() // The database name is based on the database type. dbPath := blockDbPath(cfg.DbType) diff --git a/btcec/signature.go b/btcec/signature.go index 4392ab41..6026c424 100644 --- a/btcec/signature.go +++ b/btcec/signature.go @@ -269,7 +269,7 @@ func hashToInt(hash []byte, c elliptic.Curve) *big.Int { return ret } -// recoverKeyFromSignature recoves a public key from the signature "sig" on the +// recoverKeyFromSignature recovers a public key from the signature "sig" on the // given message hash "msg". Based on the algorithm found in section 5.1.5 of // SEC 1 Ver 2.0, page 47-48 (53 and 54 in the pdf). This performs the details // in the inner loop in Step 1. The counter provided is actually the j parameter diff --git a/btcjson/cmdinfo_test.go b/btcjson/cmdinfo_test.go index b3336e64..04404027 100644 --- a/btcjson/cmdinfo_test.go +++ b/btcjson/cmdinfo_test.go @@ -183,7 +183,7 @@ func TestMethodUsageText(t *testing.T) { continue } - // Get the usage again to excerise caching. + // Get the usage again to exercise caching. usage, err = btcjson.MethodUsageText(test.method) if err != nil { t.Errorf("Test #%d (%s) unexpected error: %v", i, diff --git a/btcjson/cmdparse.go b/btcjson/cmdparse.go index abe52e36..48c6278a 100644 --- a/btcjson/cmdparse.go +++ b/btcjson/cmdparse.go @@ -183,7 +183,7 @@ func typesMaybeCompatible(dest reflect.Type, src reflect.Type) bool { return true } - // When both types are numeric, they are potentially compatibile. + // When both types are numeric, they are potentially compatible. srcKind := src.Kind() destKind := dest.Kind() if isNumeric(destKind) && isNumeric(srcKind) { diff --git a/btcjson/register_test.go b/btcjson/register_test.go index 4cac9c7a..3832678a 100644 --- a/btcjson/register_test.go +++ b/btcjson/register_test.go @@ -247,7 +247,7 @@ func TestMustRegisterCmdPanic(t *testing.T) { func TestRegisteredCmdMethods(t *testing.T) { t.Parallel() - // Ensure the registerd methods are returned. + // Ensure the registered methods are returned. methods := btcjson.RegisteredCmdMethods() if len(methods) == 0 { t.Fatal("RegisteredCmdMethods: no methods") diff --git a/btcjson/walletsvrwsntfns.go b/btcjson/walletsvrwsntfns.go index 26dc1508..8df8ebe6 100644 --- a/btcjson/walletsvrwsntfns.go +++ b/btcjson/walletsvrwsntfns.go @@ -21,7 +21,7 @@ const ( WalletLockStateNtfnMethod = "walletlockstate" // NewTxNtfnMethod is the method used to notify that a wallet server has - // added a new transaction to the transaciton store. + // added a new transaction to the transaction store. NewTxNtfnMethod = "newtx" ) diff --git a/chaincfg/params.go b/chaincfg/params.go index 60c99ac3..38b8a37a 100644 --- a/chaincfg/params.go +++ b/chaincfg/params.go @@ -87,12 +87,12 @@ const ( DeploymentTestDummy = iota // DeploymentCSV defines the rule change deployment ID for the CSV - // soft-fork package. The CSV package includes the depolyment of BIPS + // soft-fork package. The CSV package includes the deployment of BIPS // 68, 112, and 113. DeploymentCSV // DeploymentSegwit defines the rule change deployment ID for the - // Segragated Witness (segwit) soft-fork package. The segwit package + // Segregated Witness (segwit) soft-fork package. The segwit package // includes the deployment of BIPS 141, 142, 144, 145, 147 and 173. DeploymentSegwit diff --git a/integration/csv_fork_test.go b/integration/csv_fork_test.go index d7da7be7..3dd471b1 100644 --- a/integration/csv_fork_test.go +++ b/integration/csv_fork_test.go @@ -88,7 +88,7 @@ func makeTestOutput(r *rpctest.Harness, t *testing.T, return key, utxo, selfAddrScript, nil } -// TestBIP0113Activation tests for proper adherance of the BIP 113 rule +// TestBIP0113Activation tests for proper adherence of the BIP 113 rule // constraint which requires all transaction finality tests to use the MTP of // the last 11 blocks, rather than the timestamp of the block which includes // them. @@ -188,7 +188,7 @@ func TestBIP0113Activation(t *testing.T) { // At this point, the block height should be 103: we mined 101 blocks // to create a single mature output, then an additional block to create // a new output, and then mined a single block above to include our - // transation. + // transaction. assertChainHeight(r, t, 103) // Next, mine enough blocks to ensure that the soft-fork becomes diff --git a/mempool/README.md b/mempool/README.md index 7ad0a68c..d9b8d73b 100644 --- a/mempool/README.md +++ b/mempool/README.md @@ -18,7 +18,7 @@ further filtered based upon a configurable policy. One of the policy configuration options controls whether or not "standard" transactions are accepted. In essence, a "standard" transaction is one that -satisfies a fairly strict set of requirements that are largley intended to help +satisfies a fairly strict set of requirements that are largely intended to help provide fair use of the system to all users. It is important to note that what is considered a "standard" transaction changes over time. For some insight, at the time of this writing, an example of _some_ of the criteria that are required diff --git a/mempool/doc.go b/mempool/doc.go index 9bd9f41f..3adad018 100644 --- a/mempool/doc.go +++ b/mempool/doc.go @@ -16,7 +16,7 @@ further filtered based upon a configurable policy. One of the policy configuration options controls whether or not "standard" transactions are accepted. In essence, a "standard" transaction is one that -satisfies a fairly strict set of requirements that are largley intended to help +satisfies a fairly strict set of requirements that are largely intended to help provide fair use of the system to all users. It is important to note that what is considered a "standard" transaction changes over time. For some insight, at the time of this writing, an example of SOME of the criteria that are required diff --git a/mempool/mempool_test.go b/mempool/mempool_test.go index c557d61f..63541266 100644 --- a/mempool/mempool_test.go +++ b/mempool/mempool_test.go @@ -23,7 +23,7 @@ import ( // fakeChain is used by the pool harness to provide generated test utxos and // a current faked chain height to the pool callbacks. This, in turn, allows -// transations to be appear as though they are spending completely valid utxos. +// transactions to appear as though they are spending completely valid utxos. type fakeChain struct { sync.RWMutex utxos *blockchain.UtxoViewpoint diff --git a/mining/mining.go b/mining/mining.go index 09aa391f..944b049b 100644 --- a/mining/mining.go +++ b/mining/mining.go @@ -219,7 +219,7 @@ type BlockTemplate struct { WitnessCommitment []byte } -// mergeUtxoView adds all of the entries in view to viewA. The result is that +// mergeUtxoView adds all of the entries in viewB to viewA. The result is that // viewA will contain all of its original entries plus all of the entries // in viewB. It will replace any entries in viewB which also exist in viewA // if the entry in viewA is fully spent. @@ -828,7 +828,7 @@ mempoolLoop: // witness preimage generated above. With the commitment // generated, the witness script for the output is: OP_RETURN // OP_DATA_36 {0xaa21a9ed || witnessCommitment}. The leading - // prefix is refered to as the "witness magic bytes". + // prefix is referred to as the "witness magic bytes". witnessCommitment = chainhash.DoubleHashB(witnessPreimage[:]) witnessScript := append(blockchain.WitnessMagicBytes, witnessCommitment...) diff --git a/rpcclient/extensions.go b/rpcclient/extensions.go index 916ddb5f..d16cd525 100644 --- a/rpcclient/extensions.go +++ b/rpcclient/extensions.go @@ -422,7 +422,7 @@ func (c *Client) Session() (*btcjson.SessionResult, error) { return c.SessionAsync().Receive() } -// FutureVersionResult is a future promise to delivere the result of a version +// FutureVersionResult is a future promise to deliver the result of a version // RPC invocation (or an applicable error). // // NOTE: This is a btcsuite extension ported from diff --git a/rpcclient/infrastructure.go b/rpcclient/infrastructure.go index 24f0ae99..fe195cd7 100644 --- a/rpcclient/infrastructure.go +++ b/rpcclient/infrastructure.go @@ -1106,7 +1106,7 @@ type ConnConfig struct { // flag can be set to true to use basic HTTP POST requests instead. HTTPPostMode bool - // EnableBCInfoHacks is an option provided to enable compatiblity hacks + // EnableBCInfoHacks is an option provided to enable compatibility hacks // when connecting to blockchain.info RPC server EnableBCInfoHacks bool } diff --git a/rpcclient/notify.go b/rpcclient/notify.go index 9a0a3568..2454a946 100644 --- a/rpcclient/notify.go +++ b/rpcclient/notify.go @@ -28,7 +28,7 @@ var ( "to use this feature") ) -// notificationState is used to track the current state of successfuly +// notificationState is used to track the current state of successfully // registered notification so the state can be automatically re-established on // reconnect. type notificationState struct { diff --git a/rpcclient/wallet.go b/rpcclient/wallet.go index caea70b8..889a28d5 100644 --- a/rpcclient/wallet.go +++ b/rpcclient/wallet.go @@ -148,7 +148,7 @@ type FutureListUnspentResult chan *response // Receive waits for the response promised by the future and returns all // unspent wallet transaction outputs returned by the RPC call. If the -// future wac returnd by a call to ListUnspentMinAsync, ListUnspentMinMaxAsync, +// future wac returned by a call to ListUnspentMinAsync, ListUnspentMinMaxAsync, // or ListUnspentMinMaxAddressesAsync, the range may be limited by the // parameters of the RPC invocation. func (r FutureListUnspentResult) Receive() ([]btcjson.ListUnspentResult, error) { @@ -1397,7 +1397,7 @@ func (r FutureGetBalanceResult) Receive() (btcutil.Amount, error) { // FutureGetBalanceParseResult is same as FutureGetBalanceResult except // that the result is expected to be a string which is then parsed into // a float64 value -// This is required for compatiblity with servers like blockchain.info +// This is required for compatibility with servers like blockchain.info type FutureGetBalanceParseResult chan *response // Receive waits for the response promised by the future and returns the diff --git a/rpcserverhelp.go b/rpcserverhelp.go index c615d039..1705ebc8 100644 --- a/rpcserverhelp.go +++ b/rpcserverhelp.go @@ -196,7 +196,7 @@ var helpDescsEnUS = map[string]string{ "txrawresult-confirmations": "Number of confirmations of the block", "txrawresult-time": "Transaction time in seconds since 1 Jan 1970 GMT", "txrawresult-blocktime": "Block time in seconds since the 1 Jan 1970 GMT", - "txrawresult-size": "The size of the transation in bytes", + "txrawresult-size": "The size of the transaction in bytes", "txrawresult-vsize": "The virtual size of the transaction in bytes", "txrawresult-hash": "The wtxid of the transaction", @@ -221,7 +221,7 @@ var helpDescsEnUS = map[string]string{ "getblockverboseresult-size": "The size of the block", "getblockverboseresult-height": "The height of the block in the block chain", "getblockverboseresult-version": "The block version", - "getblockverboseresult-versionHex": "The block version in hexidecimal", + "getblockverboseresult-versionHex": "The block version in hexadecimal", "getblockverboseresult-merkleroot": "Root hash of the merkle tree", "getblockverboseresult-tx": "The transaction hashes (only when verbosetx=false)", "getblockverboseresult-rawtx": "The transactions as JSON objects (only when verbosetx=true)", @@ -256,7 +256,7 @@ var helpDescsEnUS = map[string]string{ "getblockheaderverboseresult-confirmations": "The number of confirmations", "getblockheaderverboseresult-height": "The height of the block in the block chain", "getblockheaderverboseresult-version": "The block version", - "getblockheaderverboseresult-versionHex": "The block version in hexidecimal", + "getblockheaderverboseresult-versionHex": "The block version in hexadecimal", "getblockheaderverboseresult-merkleroot": "Root hash of the merkle tree", "getblockheaderverboseresult-time": "The block time in seconds since 1 Jan 1970 GMT", "getblockheaderverboseresult-nonce": "The block nonce", diff --git a/sample-btcd.conf b/sample-btcd.conf index ead8d06a..a06dde66 100644 --- a/sample-btcd.conf +++ b/sample-btcd.conf @@ -302,7 +302,7 @@ ; Enable built-in CPU mining. ; ; NOTE: This is typically only useful for testing purposes such as testnet or -; simnet since the difficutly on mainnet is far too high for CPU mining to be +; simnet since the difficulty on mainnet is far too high for CPU mining to be ; worth your while. ; generate=false diff --git a/server.go b/server.go index 5b3c8385..3d381fb2 100644 --- a/server.go +++ b/server.go @@ -2101,7 +2101,7 @@ out: s.wg.Done() } -// setupRPCListeners returns a slice of listners that are configured for use +// setupRPCListeners returns a slice of listeners that are configured for use // with the RPC server depending on the configuration settings for listen // addresses and TLS. func setupRPCListeners() ([]net.Listener, error) { diff --git a/txscript/script.go b/txscript/script.go index 4977e961..aac3d4aa 100644 --- a/txscript/script.go +++ b/txscript/script.go @@ -129,9 +129,9 @@ func IsWitnessProgram(script []byte) bool { // isWitnessProgram returns true if the passed script is a witness program, and // false otherwise. A witness program MUST adhere to the following constraints: -// there must be excatly two pops (program version and the program itself), the +// there must be exactly two pops (program version and the program itself), the // first opcode MUST be a small integer (0-16), the push data MUST be -// cannonical, and finally the size of the push data must be between 2 and 40 +// canonical, and finally the size of the push data must be between 2 and 40 // bytes. func isWitnessProgram(pops []parsedOpcode) bool { return len(pops) == 2 && diff --git a/txscript/standard_test.go b/txscript/standard_test.go index 02826ab5..e24d5f61 100644 --- a/txscript/standard_test.go +++ b/txscript/standard_test.go @@ -568,13 +568,13 @@ func TestCalcScriptInfo(t *testing.T) { // unsupported address types are handled properly. type bogusAddress struct{} -// EncodeAddress simply returns an empty string. It exists to satsify the +// EncodeAddress simply returns an empty string. It exists to satisfy the // btcutil.Address interface. func (b *bogusAddress) EncodeAddress() string { return "" } -// ScriptAddress simply returns an empty byte slice. It exists to satsify the +// ScriptAddress simply returns an empty byte slice. It exists to satisfy the // btcutil.Address interface. func (b *bogusAddress) ScriptAddress() []byte { return nil @@ -585,7 +585,7 @@ func (b *bogusAddress) IsForNet(chainParams *chaincfg.Params) bool { return true // why not? } -// String simply returns an empty string. It exists to satsify the +// String simply returns an empty string. It exists to satisfy the // btcutil.Address interface. func (b *bogusAddress) String() string { return "" diff --git a/wire/common.go b/wire/common.go index 85c9df83..42c1797b 100644 --- a/wire/common.go +++ b/wire/common.go @@ -630,8 +630,8 @@ func WriteVarString(w io.Writer, pver uint32, str string) error { // ReadVarBytes reads a variable length byte array. A byte array is encoded // as a varInt containing the length of the array followed by the bytes // themselves. An error is returned if the length is greater than the -// passed maxAllowed parameter which helps protect against memory exhuastion -// attacks and forced panics thorugh malformed messages. The fieldName +// passed maxAllowed parameter which helps protect against memory exhaustion +// attacks and forced panics through malformed messages. The fieldName // parameter is only used for the error message so it provides more context in // the error. func ReadVarBytes(r io.Reader, pver uint32, maxAllowed uint32, diff --git a/wire/msggetdata_test.go b/wire/msggetdata_test.go index ea11262e..a2dd4651 100644 --- a/wire/msggetdata_test.go +++ b/wire/msggetdata_test.go @@ -78,7 +78,7 @@ func TestGetDataWire(t *testing.T) { t.Errorf("NewHashFromStr: %v", err) } - // Transation 1 of Block 203707 hash. + // Transaction 1 of Block 203707 hash. hashStr = "d28a3dc7392bf00a9855ee93dd9a81eff82a2c4fe57fbd42cfe71b487accfaf0" txHash, err := chainhash.NewHashFromStr(hashStr) if err != nil { diff --git a/wire/msginv_test.go b/wire/msginv_test.go index ea01fc11..b7c7c6ae 100644 --- a/wire/msginv_test.go +++ b/wire/msginv_test.go @@ -78,7 +78,7 @@ func TestInvWire(t *testing.T) { t.Errorf("NewHashFromStr: %v", err) } - // Transation 1 of Block 203707 hash. + // Transaction 1 of Block 203707 hash. hashStr = "d28a3dc7392bf00a9855ee93dd9a81eff82a2c4fe57fbd42cfe71b487accfaf0" txHash, err := chainhash.NewHashFromStr(hashStr) if err != nil { diff --git a/wire/msgmerkleblock_test.go b/wire/msgmerkleblock_test.go index 430c1fbb..9837f8a9 100644 --- a/wire/msgmerkleblock_test.go +++ b/wire/msgmerkleblock_test.go @@ -405,7 +405,7 @@ var merkleBlockOne = MsgMerkleBlock{ } // merkleBlockOneBytes is the serialized bytes for a merkle block created from -// block one of the block chain where the first transation matches. +// block one of the block chain where the first transaction matches. var merkleBlockOneBytes = []byte{ 0x01, 0x00, 0x00, 0x00, // Version 1 0x6f, 0xe2, 0x8c, 0x0a, 0xb6, 0xf1, 0xb3, 0x72, diff --git a/wire/msgnotfound_test.go b/wire/msgnotfound_test.go index 07da74e8..69b9d07a 100644 --- a/wire/msgnotfound_test.go +++ b/wire/msgnotfound_test.go @@ -69,7 +69,7 @@ func TestNotFoundWire(t *testing.T) { t.Errorf("NewHashFromStr: %v", err) } - // Transation 1 of Block 203707 hash. + // Transaction 1 of Block 203707 hash. hashStr = "d28a3dc7392bf00a9855ee93dd9a81eff82a2c4fe57fbd42cfe71b487accfaf0" txHash, err := chainhash.NewHashFromStr(hashStr) if err != nil { diff --git a/wire/msgtx.go b/wire/msgtx.go index af8abf61..a5327cb3 100644 --- a/wire/msgtx.go +++ b/wire/msgtx.go @@ -923,7 +923,7 @@ func writeOutPoint(w io.Writer, pver uint32, version int32, op *OutPoint) error // script. It is encoded as a varInt containing the length of the array // followed by the bytes themselves. An error is returned if the length is // greater than the passed maxAllowed parameter which helps protect against -// memory exhuastion attacks and forced panics thorugh malformed messages. The +// memory exhaustion attacks and forced panics through malformed messages. The // fieldName parameter is only used for the error message so it provides more // context in the error. func readScript(r io.Reader, pver uint32, maxAllowed uint32, fieldName string) ([]byte, error) {