mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
core, eth, swarm: fix linter errors
This commit is contained in:
parent
1acefafe22
commit
11b8dcd82b
4 changed files with 9 additions and 9 deletions
|
|
@ -355,7 +355,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
|
||||||
|
|
|
||||||
|
|
@ -159,8 +159,8 @@ type SwarmSyncerClient struct {
|
||||||
// NewSwarmSyncerClient is a contructor for provable data exchange syncer
|
// NewSwarmSyncerClient is a contructor for provable data exchange syncer
|
||||||
func NewSwarmSyncerClient(p *Peer, db *storage.DBAPI, ignoreExistingRequest bool, stream Stream) (*SwarmSyncerClient, error) {
|
func NewSwarmSyncerClient(p *Peer, db *storage.DBAPI, ignoreExistingRequest bool, stream Stream) (*SwarmSyncerClient, error) {
|
||||||
return &SwarmSyncerClient{
|
return &SwarmSyncerClient{
|
||||||
db: db,
|
db: db,
|
||||||
peer: p,
|
peer: p,
|
||||||
ignoreExistingRequest: ignoreExistingRequest,
|
ignoreExistingRequest: ignoreExistingRequest,
|
||||||
stream: stream,
|
stream: stream,
|
||||||
}, nil
|
}, nil
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue