From a4df044cfd41318552b8064cc34eaadc3eeade59 Mon Sep 17 00:00:00 2001 From: Thabokani <149070269+Thabokani@users.noreply.github.com> Date: Thu, 4 Jan 2024 05:36:49 +0800 Subject: [PATCH] Fix some typos (#2085) * Dockerfile: fix typo * blockchain: fix typos * sample-btcd.conf: fix typos * server: fix typos * txscript: fix typos --- Dockerfile | 2 +- blockchain/sizehelper.go | 2 +- blockchain/utxocache.go | 2 +- blockchain/utxocache_test.go | 2 +- sample-btcd.conf | 2 +- server.go | 6 +++--- txscript/error.go | 6 +++--- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5ed3e63c10..a715e89ba6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ # # docker build . -t yourregistry/btcd # -# You can use the following command to buid an arm64v8 container: +# You can use the following command to build an arm64v8 container: # # docker build . -t yourregistry/btcd --build-arg ARCH=arm64v8 # diff --git a/blockchain/sizehelper.go b/blockchain/sizehelper.go index 4904a8e4c3..8330549dd6 100644 --- a/blockchain/sizehelper.go +++ b/blockchain/sizehelper.go @@ -39,7 +39,7 @@ const ( avgEntrySize = baseEntrySize + (pubKeyHashLen + 7) ) -// The code here is shamelessely taken from the go runtime package. All the relevant +// The code here is shamelessly taken from the go runtime package. All the relevant // code and variables are copied to here. These values are only correct for a 64 bit // system. diff --git a/blockchain/utxocache.go b/blockchain/utxocache.go index af7a3b7b6f..b6ad0bd765 100644 --- a/blockchain/utxocache.go +++ b/blockchain/utxocache.go @@ -177,7 +177,7 @@ const ( // utxoFlushPeriodicInterval is the interval at which a flush is performed // when the flush mode FlushPeriodic is used. This is used when the initial // block download is complete and it's useful to flush periodically in case - // of unforseen shutdowns. + // of unforeseen shutdowns. utxoFlushPeriodicInterval = time.Minute * 5 ) diff --git a/blockchain/utxocache_test.go b/blockchain/utxocache_test.go index 20b2a5b34a..45116655e3 100644 --- a/blockchain/utxocache_test.go +++ b/blockchain/utxocache_test.go @@ -260,7 +260,7 @@ func TestUtxoCacheEntrySize(t *testing.T) { } return blocks }(), - // Multipled by 6 since we'll have 6 entries left. + // Multiplied by 6 since we'll have 6 entries left. expectedSize: (pubKeyHashLen + baseEntrySize) * 6, }, { diff --git a/sample-btcd.conf b/sample-btcd.conf index 0a765fcabe..74b20e1660 100644 --- a/sample-btcd.conf +++ b/sample-btcd.conf @@ -48,7 +48,7 @@ ; Use Universal Plug and Play (UPnP) to automatically open the listen port ; and obtain the external IP address from supported devices. NOTE: This option -; will have no effect if exernal IP addresses are specified. +; will have no effect if external IP addresses are specified. ; upnp=1 ; Specify the external IP addresses your node is listening on. One address per diff --git a/server.go b/server.go index 356326ab1c..0aa84d1f9c 100644 --- a/server.go +++ b/server.go @@ -478,7 +478,7 @@ func (sp *serverPeer) OnVersion(_ *peer.Peer, msg *wire.MsgVersion) *wire.MsgRej addrManager.SetServices(remoteAddr, msg.Services) } - // Ignore peers that have a protcol version that is too old. The peer + // Ignore peers that have a protocol version that is too old. The peer // negotiation logic will disconnect it after this callback returns. if msg.ProtocolVersion < int32(peer.MinAcceptableProtocolVersion) { return nil @@ -2204,7 +2204,7 @@ func (s *server) outboundPeerConnected(c *connmgr.ConnReq, conn net.Conn) { go s.peerDoneHandler(sp) } -// peerDoneHandler handles peer disconnects by notifiying the server that it's +// peerDoneHandler handles peer disconnects by notifying the server that it's // done along with other performing other desirable cleanup. func (s *server) peerDoneHandler(sp *serverPeer) { sp.WaitForDisconnect() @@ -2231,7 +2231,7 @@ func (s *server) peerDoneHandler(sp *serverPeer) { func (s *server) peerHandler() { // Start the address manager and sync manager, both of which are needed // by peers. This is done here since their lifecycle is closely tied - // to this handler and rather than adding more channels to sychronize + // to this handler and rather than adding more channels to synchronize // things, it's easier and slightly faster to simply start and stop them // in this handler. s.addrManager.Start() diff --git a/txscript/error.go b/txscript/error.go index 1f046b9612..68bea7e879 100644 --- a/txscript/error.go +++ b/txscript/error.go @@ -309,9 +309,9 @@ const ( ErrMinimalIf // ErrDiscourageUpgradableWitnessProgram is returned if - // ScriptVerifyWitness is set and the versino of an executing witness + // ScriptVerifyWitness is set and the version of an executing witness // program is outside the set of currently defined witness program - // vesions. + // versions. ErrDiscourageUpgradableWitnessProgram // ---------------------------------------- @@ -363,7 +363,7 @@ const ( ErrTapscriptCheckMultisig // ErrDiscourageUpgradeableTaprootVersion is returned if during - // tapscript execution, we encoutner a public key that isn't 0 or 32 + // tapscript execution, we encounter a public key that isn't 0 or 32 // bytes. ErrDiscourageUpgradeablePubKeyType