Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geth/logging_test.go, txpool : tiny & go fmt #28654

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/geth/logging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ package main
import (
"bufio"
"bytes"
"encoding/json"
"fmt"
"io"
"math/rand"
"os"
"os/exec"
"strings"
"testing"
"encoding/json"

"github.com/ethereum/go-ethereum/internal/reexec"
)
Expand Down
6 changes: 2 additions & 4 deletions core/txpool/legacypool/legacypool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
Loading