mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-20 11:46:44 +00:00
fix bug
This commit is contained in:
parent
9cd93b97f1
commit
ef24293d91
1 changed files with 3 additions and 5 deletions
|
|
@ -953,16 +953,14 @@ func (pool *LegacyPool) Add(txs []*types.Transaction, sync bool) []error {
|
||||||
// The transaction pool lock must be held.
|
// The transaction pool lock must be held.
|
||||||
// Returns the error for each tx, and the set of accounts that might become promotable.
|
// Returns the error for each tx, and the set of accounts that might become promotable.
|
||||||
func (pool *LegacyPool) addTxsLocked(txs []*types.Transaction, errs []error) (int64, *accountSet) {
|
func (pool *LegacyPool) addTxsLocked(txs []*types.Transaction, errs []error) (int64, *accountSet) {
|
||||||
// Short circuit if no transactions.
|
|
||||||
if len(txs) == 0 {
|
|
||||||
return 0, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
var (
|
var (
|
||||||
dirty = newAccountSet(pool.signer)
|
dirty = newAccountSet(pool.signer)
|
||||||
valid int64
|
valid int64
|
||||||
)
|
)
|
||||||
for i, tx := range txs {
|
for i, tx := range txs {
|
||||||
|
if tx == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if replaced, err := pool.add(tx); err == nil {
|
if replaced, err := pool.add(tx); err == nil {
|
||||||
if !replaced {
|
if !replaced {
|
||||||
dirty.addTx(tx)
|
dirty.addTx(tx)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue