forked from cerc-io/plugeth
core/txpool : small cleanup refactors (#28654)
This commit is contained in:
@@ -923,8 +923,7 @@ func (pool *LegacyPool) addLocals(txs []*types.Transaction) []error {
|
||||
// addLocal enqueues a single local transaction into the pool if it is valid. This is
|
||||
// a convenience wrapper around addLocals.
|
||||
func (pool *LegacyPool) addLocal(tx *types.Transaction) error {
|
||||
errs := pool.addLocals([]*types.Transaction{tx})
|
||||
return errs[0]
|
||||
return pool.addLocals([]*types.Transaction{tx})[0]
|
||||
}
|
||||
|
||||
// addRemotes enqueues a batch of transactions into the pool if they are valid. If the
|
||||
@@ -939,8 +938,7 @@ func (pool *LegacyPool) addRemotes(txs []*types.Transaction) []error {
|
||||
// addRemote enqueues a single transaction into the pool if it is valid. This is a convenience
|
||||
// wrapper around addRemotes.
|
||||
func (pool *LegacyPool) addRemote(tx *types.Transaction) error {
|
||||
errs := pool.addRemotes([]*types.Transaction{tx})
|
||||
return errs[0]
|
||||
return pool.addRemotes([]*types.Transaction{tx})[0]
|
||||
}
|
||||
|
||||
// addRemotesSync is like addRemotes, but waits for pool reorganization. Tests use this method.
|
||||
|
||||
Reference in New Issue
Block a user