mirror of
https://github.com/btcsuite/btcd.git
synced 2024-11-19 01:40:07 +01:00
chore: fix some comments (#2146)
Signed-off-by: xiaoxiangxianzi <zhaoyizheng@outlook.com>
This commit is contained in:
parent
a03259b26b
commit
95330bc1bb
@ -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
|
||||
|
@ -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")
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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 := ¬ificationTxAcceptedByMempool{
|
||||
|
Loading…
Reference in New Issue
Block a user