mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
geth/logging_test.go, txpool : tiny & go fmt
This commit is contained in:
parent
a113497dd7
commit
6c6daa86b4
2 changed files with 3 additions and 5 deletions
|
|
@ -21,6 +21,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
|
@ -28,7 +29,6 @@ import (
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"encoding/json"
|
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/internal/reexec"
|
"github.com/ethereum/go-ethereum/internal/reexec"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -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
|
// addLocal enqueues a single local transaction into the pool if it is valid. This is
|
||||||
// a convenience wrapper around addLocals.
|
// a convenience wrapper around addLocals.
|
||||||
func (pool *LegacyPool) addLocal(tx *types.Transaction) error {
|
func (pool *LegacyPool) addLocal(tx *types.Transaction) error {
|
||||||
errs := pool.addLocals([]*types.Transaction{tx})
|
return pool.addLocals([]*types.Transaction{tx})[0]
|
||||||
return errs[0]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// addRemotes enqueues a batch of transactions into the pool if they are valid. If the
|
// 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
|
// addRemote enqueues a single transaction into the pool if it is valid. This is a convenience
|
||||||
// wrapper around addRemotes.
|
// wrapper around addRemotes.
|
||||||
func (pool *LegacyPool) addRemote(tx *types.Transaction) error {
|
func (pool *LegacyPool) addRemote(tx *types.Transaction) error {
|
||||||
errs := pool.addRemotes([]*types.Transaction{tx})
|
return pool.addRemotes([]*types.Transaction{tx})[0]
|
||||||
return errs[0]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// addRemotesSync is like addRemotes, but waits for pool reorganization. Tests use this method.
|
// addRemotesSync is like addRemotes, but waits for pool reorganization. Tests use this method.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue