Make lint changes
This commit is contained in:
parent
0e263a23be
commit
c412168e1c
@ -241,13 +241,13 @@ func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) {
|
||||
pgConfig.MaxIdle = ctx.GlobalInt(utils.StateDiffDBMaxIdleConns.Name)
|
||||
}
|
||||
if ctx.GlobalIsSet(utils.StateDiffDBMaxConnLifetime.Name) {
|
||||
pgConfig.MaxConnLifetime = ctx.GlobalDuration(utils.StateDiffDBMaxConnLifetime.Name) * time.Second
|
||||
pgConfig.MaxConnLifetime = time.Duration(ctx.GlobalDuration(utils.StateDiffDBMaxConnLifetime.Name).Seconds())
|
||||
}
|
||||
if ctx.GlobalIsSet(utils.StateDiffDBMaxConnIdleTime.Name) {
|
||||
pgConfig.MaxConnIdleTime = ctx.GlobalDuration(utils.StateDiffDBMaxConnIdleTime.Name) * time.Second
|
||||
pgConfig.MaxConnIdleTime = time.Duration(ctx.GlobalDuration(utils.StateDiffDBMaxConnIdleTime.Name).Seconds())
|
||||
}
|
||||
if ctx.GlobalIsSet(utils.StateDiffDBConnTimeout.Name) {
|
||||
pgConfig.ConnTimeout = ctx.GlobalDuration(utils.StateDiffDBConnTimeout.Name) * time.Second
|
||||
pgConfig.ConnTimeout = time.Duration(ctx.GlobalDuration(utils.StateDiffDBConnTimeout.Name).Seconds())
|
||||
}
|
||||
indexerConfig = pgConfig
|
||||
case shared.DUMP:
|
||||
|
@ -18,8 +18,6 @@ var (
|
||||
)
|
||||
|
||||
type gapValues struct {
|
||||
lastProcessedBlock int64
|
||||
currentBlock int64
|
||||
knownErrorBlocksStart int64
|
||||
knownErrorBlocksEnd int64
|
||||
expectedDif int64
|
||||
|
@ -112,8 +112,8 @@ func testErrorInChainEventLoop(t *testing.T) {
|
||||
|
||||
payloads := make([]statediff.Payload, 0, 2)
|
||||
wg := new(sync.WaitGroup)
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
wg.Add(1)
|
||||
for i := 0; i < 2; i++ {
|
||||
select {
|
||||
case payload := <-payloadChan:
|
||||
|
@ -34,7 +34,6 @@ type BlockChain struct {
|
||||
HashesLookedUp []common.Hash
|
||||
blocksToReturnByHash map[common.Hash]*types.Block
|
||||
blocksToReturnByNumber map[uint64]*types.Block
|
||||
callCount int
|
||||
ChainEvents []core.ChainEvent
|
||||
Receipts map[common.Hash]types.Receipts
|
||||
TDByHash map[common.Hash]*big.Int
|
||||
|
@ -154,8 +154,8 @@ func testSubscriptionAPI(t *testing.T) {
|
||||
payloadChan := make(chan statediff.Payload)
|
||||
quitChan := make(chan bool)
|
||||
wg := new(sync.WaitGroup)
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
wg.Add(1)
|
||||
defer wg.Done()
|
||||
sort.Slice(expectedStateDiffBytes, func(i, j int) bool { return expectedStateDiffBytes[i] < expectedStateDiffBytes[j] })
|
||||
select {
|
||||
@ -177,7 +177,7 @@ func testSubscriptionAPI(t *testing.T) {
|
||||
t.Errorf("channel quit before delivering payload")
|
||||
}
|
||||
}()
|
||||
time.Sleep(1)
|
||||
time.Sleep(1 * time.Second)
|
||||
mockService.Subscribe(id, payloadChan, quitChan, parameters)
|
||||
blockChan <- block1
|
||||
parentBlockChain <- block0
|
||||
|
Loading…
Reference in New Issue
Block a user