Skip to content

Commit

Permalink
chore: fix some comments (#2146)
Browse files Browse the repository at this point in the history
Signed-off-by: xiaoxiangxianzi <zhaoyizheng@outlook.com>
  • Loading branch information
xiaoxiangxianzi committed Mar 27, 2024
1 parent a03259b commit 95330bc
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion blockchain/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ func (b *BlockChain) disconnectBlock(node *blockNode, block *btcutil.Block, view
// Flush the cache on every disconnect. Since the code for
// reorganization modifies the database directly, the cache
// will be left in an inconsistent state if we don't flush it
// prior to the dbPutUtxoView that happends below.
// prior to the dbPutUtxoView that happens below.
err = b.utxoCache.flush(dbTx, FlushRequired, state)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion btcutil/gcs/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func (b *GCSBuilder) Build() (*gcs.Filter, error) {
return nil, b.err
}

// We'll ensure that all the paramaters we need to actually build the
// We'll ensure that all the parameters we need to actually build the
// filter properly are set.
if b.p == 0 {
return nil, fmt.Errorf("p value is not set, cannot build")
Expand Down
2 changes: 1 addition & 1 deletion btcutil/psbt/creator.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const MinTxVersion = 1
// within the unsigned transaction. The values of nLockTime, nSequence (per
// input) and transaction version (must be 1 of 2) must be specified here. Note
// that the default nSequence value is wire.MaxTxInSequenceNum. Referencing
// the PSBT BIP, this function serves the roles of teh Creator.
// the PSBT BIP, this function serves the roles of the Creator.
func New(inputs []*wire.OutPoint,
outputs []*wire.TxOut, version int32, nLockTime uint32,
nSequences []uint32) (*Packet, error) {
Expand Down
2 changes: 1 addition & 1 deletion btcutil/psbt/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ func serializeKVPairWithType(w io.Writer, kt uint8, keydata []byte,

// getKey retrieves a single key - both the key type and the keydata (if
// present) from the stream and returns the key type as an integer, or -1 if
// the key was of zero length. This integer is is used to indicate the presence
// the key was of zero length. This integer is used to indicate the presence
// of a separator byte which indicates the end of a given key-value pair list,
// and the keydata as a byte slice or nil if none is present.
func getKey(r io.Reader) (int, []byte, error) {
Expand Down
2 changes: 1 addition & 1 deletion mempool/mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -1635,7 +1635,7 @@ func (mp *TxPool) validateStandardness(tx *btcutil.Tx, nextBlockHeight int32,
}

// validateSigCost checks the cost to run the signature operations to make sure
// the number of singatures are sane.
// the number of signatures are sane.
func (mp *TxPool) validateSigCost(tx *btcutil.Tx,
utxoView *blockchain.UtxoViewpoint) error {

Expand Down
2 changes: 1 addition & 1 deletion netsync/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ func (sm *SyncManager) haveInventory(invVect *wire.InvVect) (bool, error) {
return false, nil
}

// The requested inventory is is an unsupported type, so just claim
// The requested inventory is an unsupported type, so just claim
// it is known to avoid requesting it.
return true, nil
}
Expand Down
2 changes: 1 addition & 1 deletion rpcwebsocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func (m *wsNotificationManager) NotifyBlockDisconnected(block *btcutil.Block) {

// NotifyMempoolTx passes a transaction accepted by mempool to the
// notification manager for transaction notification processing. If
// isNew is true, the tx is is a new transaction, rather than one
// isNew is true, the tx is a new transaction, rather than one
// added to the mempool during a reorg.
func (m *wsNotificationManager) NotifyMempoolTx(tx *btcutil.Tx, isNew bool) {
n := &notificationTxAcceptedByMempool{
Expand Down

0 comments on commit 95330bc

Please sign in to comment.