mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core: tiny comment nit fixups
This commit is contained in:
parent
d905ebb474
commit
666b117a45
1 changed files with 2 additions and 3 deletions
|
|
@ -818,7 +818,7 @@ func (pool *TxPool) AddRemotes(txs []*types.Transaction) []error {
|
||||||
|
|
||||||
// addTx enqueues a single transaction into the pool if it is valid.
|
// addTx enqueues a single transaction into the pool if it is valid.
|
||||||
func (pool *TxPool) addTx(tx *types.Transaction, local bool) error {
|
func (pool *TxPool) addTx(tx *types.Transaction, local bool) error {
|
||||||
// caching signature check result before holding lock significantly improve concurrency
|
// Cache sender in transaction before obtaining lock (pool.signer is immutable)
|
||||||
types.Sender(pool.signer, tx)
|
types.Sender(pool.signer, tx)
|
||||||
|
|
||||||
pool.mu.Lock()
|
pool.mu.Lock()
|
||||||
|
|
@ -839,11 +839,10 @@ func (pool *TxPool) addTx(tx *types.Transaction, local bool) error {
|
||||||
|
|
||||||
// addTxs attempts to queue a batch of transactions if they are valid.
|
// addTxs attempts to queue a batch of transactions if they are valid.
|
||||||
func (pool *TxPool) addTxs(txs []*types.Transaction, local bool) []error {
|
func (pool *TxPool) addTxs(txs []*types.Transaction, local bool) []error {
|
||||||
// caching signature check result before holding lock significantly improve concurrency
|
// Cache senders in transactions before obtaining lock (pool.signer is immutable)
|
||||||
for _, tx := range txs {
|
for _, tx := range txs {
|
||||||
types.Sender(pool.signer, tx)
|
types.Sender(pool.signer, tx)
|
||||||
}
|
}
|
||||||
|
|
||||||
pool.mu.Lock()
|
pool.mu.Lock()
|
||||||
defer pool.mu.Unlock()
|
defer pool.mu.Unlock()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue