diff --git a/cmd/puppeth/wizard_genesis.go b/cmd/puppeth/wizard_genesis.go index 7c54e59ff6c0..40957122bd57 100644 --- a/cmd/puppeth/wizard_genesis.go +++ b/cmd/puppeth/wizard_genesis.go @@ -35,9 +35,9 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" blockSignerContract "github.com/ethereum/go-ethereum/contracts/blocksigner" + multiSignWalletContract "github.com/ethereum/go-ethereum/contracts/multisigwallet" randomizeContract "github.com/ethereum/go-ethereum/contracts/randomize" validatorContract "github.com/ethereum/go-ethereum/contracts/validator" - multiSignWalletContract "github.com/ethereum/go-ethereum/contracts/multisigwallet" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/rlp" ) diff --git a/contracts/utils_test.go b/contracts/utils_test.go index 7ba0e25f2df3..401d17411119 100644 --- a/contracts/utils_test.go +++ b/contracts/utils_test.go @@ -22,11 +22,11 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/consensus/posv" "github.com/ethereum/go-ethereum/contracts/blocksigner" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/consensus/posv" "math/big" "math/rand" "testing" diff --git a/core/genesis.go b/core/genesis.go index 9d8eb279532c..c87460b90834 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -366,7 +366,7 @@ func DeveloperGenesisBlock(period uint64, faucet common.Address) *Genesis { common.BytesToAddress([]byte{6}): {Balance: big.NewInt(1)}, // ECAdd common.BytesToAddress([]byte{7}): {Balance: big.NewInt(1)}, // ECScalarMul common.BytesToAddress([]byte{8}): {Balance: big.NewInt(1)}, // ECPairing - faucet: {Balance: new(big.Int).Sub(new(big.Int).Lsh(big.NewInt(1), 256), big.NewInt(9))}, + faucet: {Balance: new(big.Int).Sub(new(big.Int).Lsh(big.NewInt(1), 256), big.NewInt(9))}, }, } } diff --git a/eth/downloader/api.go b/eth/downloader/api.go index d496fa6a4d4f..581e9aed2498 100644 --- a/eth/downloader/api.go +++ b/eth/downloader/api.go @@ -40,8 +40,8 @@ type PublicDownloaderAPI struct { // installSyncSubscription channel. func NewPublicDownloaderAPI(d *Downloader, m *event.TypeMux) *PublicDownloaderAPI { api := &PublicDownloaderAPI{ - d: d, - mux: m, + d: d, + mux: m, installSyncSubscription: make(chan chan interface{}), uninstallSyncSubscription: make(chan *uninstallSyncSubscriptionRequest), } diff --git a/eth/fetcher/fetcher.go b/eth/fetcher/fetcher.go index fb29a37ec302..65e69d72758d 100644 --- a/eth/fetcher/fetcher.go +++ b/eth/fetcher/fetcher.go @@ -669,7 +669,7 @@ func (f *Fetcher) insert(peer string, block *types.Block) { go f.broadcastBlock(block, true) return } - f.enqueue(peer,newBlock) + f.enqueue(peer, newBlock) return default: // Something went very wrong, drop the peer diff --git a/eth/handler_test.go b/eth/handler_test.go index e336dfa2857a..923df129a026 100644 --- a/eth/handler_test.go +++ b/eth/handler_test.go @@ -242,10 +242,10 @@ func testGetBlockBodies(t *testing.T, protocol int) { available []bool // Availability of explicitly requested blocks expected int // Total number of existing blocks to expect }{ - {1, nil, nil, 1}, // A single random block should be retrievable - {10, nil, nil, 10}, // Multiple random blocks should be retrievable - {limit, nil, nil, limit}, // The maximum possible blocks should be retrievable - {limit + 1, nil, nil, limit}, // No more than the possible block count should be returned + {1, nil, nil, 1}, // A single random block should be retrievable + {10, nil, nil, 10}, // Multiple random blocks should be retrievable + {limit, nil, nil, limit}, // The maximum possible blocks should be retrievable + {limit + 1, nil, nil, limit}, // No more than the possible block count should be returned {0, []common.Hash{pm.blockchain.Genesis().Hash()}, []bool{true}, 1}, // The genesis block should be retrievable {0, []common.Hash{pm.blockchain.CurrentBlock().Hash()}, []bool{true}, 1}, // The chains head block should be retrievable {0, []common.Hash{{}}, []bool{false}, 0}, // A non existent block should not be returned diff --git a/p2p/discover/table.go b/p2p/discover/table.go index 704b3b612a6a..55fcf96534d9 100644 --- a/p2p/discover/table.go +++ b/p2p/discover/table.go @@ -40,9 +40,9 @@ import ( ) const ( - alpha = 3 // Kademlia concurrency factor + alpha = 3 // Kademlia concurrency factor bucketSize = 200 // Kademlia bucket size - maxReplacements = 10 // Size of per-bucket replacement list + maxReplacements = 10 // Size of per-bucket replacement list // We keep buckets for the upper 1/15 of distances because // it's very unlikely we'll ever encounter a node that's closer. diff --git a/swarm/api/http/error.go b/swarm/api/http/error.go index 9a65412cf997..2f77f2784a31 100644 --- a/swarm/api/http/error.go +++ b/swarm/api/http/error.go @@ -71,7 +71,7 @@ func initErrHandling() { multipleChoicesPage := GetMultipleChoicesErrorPage() //map the codes to the available pages tnames := map[int]string{ - 0: genErrPage, //default + 0: genErrPage, //default http.StatusBadRequest: genErrPage, http.StatusNotFound: notFoundPage, http.StatusMultipleChoices: multipleChoicesPage,