mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
make gofmt
This commit is contained in:
parent
6abaf57816
commit
47af8deec1
6 changed files with 12 additions and 12 deletions
|
|
@ -224,7 +224,7 @@ type Posv struct {
|
||||||
signFn clique.SignerFn // Signer function to authorize hashes with
|
signFn clique.SignerFn // Signer function to authorize hashes with
|
||||||
lock sync.RWMutex // Protects the signer fields
|
lock sync.RWMutex // Protects the signer fields
|
||||||
|
|
||||||
HookReward func(chain consensus.ChainReader, state *state.StateDB, header *types.Header) (error, map[string]interface{})
|
HookReward func(chain consensus.ChainReader, state *state.StateDB, header *types.Header) (error, map[string]interface{})
|
||||||
HookPenalty func(chain consensus.ChainReader, blockNumberEpoc uint64) ([]common.Address, error)
|
HookPenalty func(chain consensus.ChainReader, blockNumberEpoc uint64) ([]common.Address, error)
|
||||||
HookValidator func(header *types.Header, signers []common.Address) ([]byte, error)
|
HookValidator func(header *types.Header, signers []common.Address) ([]byte, error)
|
||||||
HookVerifyMNs func(header *types.Header, signers []common.Address) error
|
HookVerifyMNs func(header *types.Header, signers []common.Address) error
|
||||||
|
|
|
||||||
|
|
@ -141,9 +141,9 @@ type BlockChain struct {
|
||||||
validator Validator // block and state validator interface
|
validator Validator // block and state validator interface
|
||||||
vmConfig vm.Config
|
vmConfig vm.Config
|
||||||
|
|
||||||
badBlocks *lru.Cache // Bad block cache
|
badBlocks *lru.Cache // Bad block cache
|
||||||
IPCEndpoint string
|
IPCEndpoint string
|
||||||
Client *ethclient.Client // Global ipc client instance.
|
Client *ethclient.Client // Global ipc client instance.
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewBlockChain returns a fully initialised block chain using information
|
// NewBlockChain returns a fully initialised block chain using information
|
||||||
|
|
|
||||||
|
|
@ -366,7 +366,7 @@ func DeveloperGenesisBlock(period uint64, faucet common.Address) *Genesis {
|
||||||
common.BytesToAddress([]byte{6}): {Balance: big.NewInt(1)}, // ECAdd
|
common.BytesToAddress([]byte{6}): {Balance: big.NewInt(1)}, // ECAdd
|
||||||
common.BytesToAddress([]byte{7}): {Balance: big.NewInt(1)}, // ECScalarMul
|
common.BytesToAddress([]byte{7}): {Balance: big.NewInt(1)}, // ECScalarMul
|
||||||
common.BytesToAddress([]byte{8}): {Balance: big.NewInt(1)}, // ECPairing
|
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))},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,8 @@ type PublicDownloaderAPI struct {
|
||||||
// installSyncSubscription channel.
|
// installSyncSubscription channel.
|
||||||
func NewPublicDownloaderAPI(d *Downloader, m *event.TypeMux) *PublicDownloaderAPI {
|
func NewPublicDownloaderAPI(d *Downloader, m *event.TypeMux) *PublicDownloaderAPI {
|
||||||
api := &PublicDownloaderAPI{
|
api := &PublicDownloaderAPI{
|
||||||
d: d,
|
d: d,
|
||||||
mux: m,
|
mux: m,
|
||||||
installSyncSubscription: make(chan chan interface{}),
|
installSyncSubscription: make(chan chan interface{}),
|
||||||
uninstallSyncSubscription: make(chan *uninstallSyncSubscriptionRequest),
|
uninstallSyncSubscription: make(chan *uninstallSyncSubscriptionRequest),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -242,10 +242,10 @@ func testGetBlockBodies(t *testing.T, protocol int) {
|
||||||
available []bool // Availability of explicitly requested blocks
|
available []bool // Availability of explicitly requested blocks
|
||||||
expected int // Total number of existing blocks to expect
|
expected int // Total number of existing blocks to expect
|
||||||
}{
|
}{
|
||||||
{1, nil, nil, 1}, // A single random block should be retrievable
|
{1, nil, nil, 1}, // A single random block should be retrievable
|
||||||
{10, nil, nil, 10}, // Multiple random blocks 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, 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
|
{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.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{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
|
{0, []common.Hash{{}}, []bool{false}, 0}, // A non existent block should not be returned
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ func initErrHandling() {
|
||||||
multipleChoicesPage := GetMultipleChoicesErrorPage()
|
multipleChoicesPage := GetMultipleChoicesErrorPage()
|
||||||
//map the codes to the available pages
|
//map the codes to the available pages
|
||||||
tnames := map[int]string{
|
tnames := map[int]string{
|
||||||
0: genErrPage, //default
|
0: genErrPage, //default
|
||||||
http.StatusBadRequest: genErrPage,
|
http.StatusBadRequest: genErrPage,
|
||||||
http.StatusNotFound: notFoundPage,
|
http.StatusNotFound: notFoundPage,
|
||||||
http.StatusMultipleChoices: multipleChoicesPage,
|
http.StatusMultipleChoices: multipleChoicesPage,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue