@@ -451,7 +451,7 @@ func (bigtable *Bigtable) GetFullBlocksDescending(stream chan<- *types.Eth1Block
451
451
})
452
452
defer tmr .Stop ()
453
453
454
- ctx , cancel := context .WithDeadline (context .Background (), time .Now ().Add (time .Second * 180 ))
454
+ ctx , cancel := context .WithDeadline (context .Background (), time .Now ().Add (time .Minute * 3 ))
455
455
defer cancel ()
456
456
457
457
if high < low {
@@ -3026,7 +3026,7 @@ func (bigtable *Bigtable) GetMetadataUpdates(prefix string, startToken string, l
3026
3026
})
3027
3027
defer tmr .Stop ()
3028
3028
3029
- ctx , cancel := context .WithDeadline (context .Background (), time .Now ().Add (time .Minute * 120 ))
3029
+ ctx , cancel := context .WithDeadline (context .Background (), time .Now ().Add (time .Hour * 2 ))
3030
3030
defer cancel ()
3031
3031
3032
3032
keys := make ([]string , 0 , limit )
@@ -3062,7 +3062,7 @@ func (bigtable *Bigtable) GetMetadata(startToken string, limit int) ([]string, [
3062
3062
})
3063
3063
defer tmr .Stop ()
3064
3064
3065
- ctx , cancel := context .WithDeadline (context .Background (), time .Now ().Add (time .Minute * 120 ))
3065
+ ctx , cancel := context .WithDeadline (context .Background (), time .Now ().Add (time .Hour * 2 ))
3066
3066
defer cancel ()
3067
3067
3068
3068
keys := make ([]string , 0 , limit )
@@ -3411,7 +3411,7 @@ func (bigtable *Bigtable) GetAddressName(address []byte) (string, error) {
3411
3411
rowKey := fmt .Sprintf ("%s:%x" , bigtable .chainId , address )
3412
3412
cacheKey := bigtable .chainId + ":NAME:" + rowKey
3413
3413
3414
- if wanted , err := cache .TieredCache .GetStringWithLocalTimeout (cacheKey , time . Hour * 24 ); err == nil {
3414
+ if wanted , err := cache .TieredCache .GetStringWithLocalTimeout (cacheKey , utils . Day ); err == nil {
3415
3415
// logrus.Infof("retrieved name for address %x from cache", address)
3416
3416
return wanted , nil
3417
3417
}
@@ -3495,7 +3495,7 @@ func (bigtable *Bigtable) GetContractMetadata(address []byte) (*types.ContractMe
3495
3495
3496
3496
rowKey := fmt .Sprintf ("%s:%x" , bigtable .chainId , address )
3497
3497
cacheKey := bigtable .chainId + ":CONTRACT:" + rowKey
3498
- if cached , err := cache .TieredCache .GetWithLocalTimeout (cacheKey , time . Hour * 24 , new (types.ContractMetadata )); err == nil {
3498
+ if cached , err := cache .TieredCache .GetWithLocalTimeout (cacheKey , utils . Day , new (types.ContractMetadata )); err == nil {
3499
3499
ret := cached .(* types.ContractMetadata )
3500
3500
val , err := abi .JSON (bytes .NewReader (ret .ABIJson ))
3501
3501
ret .ABI = & val
@@ -3520,7 +3520,7 @@ func (bigtable *Bigtable) GetContractMetadata(address []byte) (*types.ContractMe
3520
3520
} else {
3521
3521
utils .LogError (err , "Fetching contract metadata" , 0 , logAdditionalInfo )
3522
3522
}
3523
- err := cache .TieredCache .Set (cacheKey , & types.ContractMetadata {}, time . Hour * 24 )
3523
+ err := cache .TieredCache .Set (cacheKey , & types.ContractMetadata {}, utils . Day )
3524
3524
if err != nil {
3525
3525
utils .LogError (err , "Caching contract metadata" , 0 , logAdditionalInfo )
3526
3526
}
@@ -3530,14 +3530,14 @@ func (bigtable *Bigtable) GetContractMetadata(address []byte) (*types.ContractMe
3530
3530
3531
3531
// No contract found, caching empty
3532
3532
if ret == nil {
3533
- err = cache .TieredCache .Set (cacheKey , & types.ContractMetadata {}, time . Hour * 24 )
3533
+ err = cache .TieredCache .Set (cacheKey , & types.ContractMetadata {}, utils . Day )
3534
3534
if err != nil {
3535
3535
utils .LogError (err , "Caching contract metadata" , 0 , map [string ]interface {}{"address" : fmt .Sprintf ("%x" , address )})
3536
3536
}
3537
3537
return nil , nil
3538
3538
}
3539
3539
3540
- err = cache .TieredCache .Set (cacheKey , ret , time . Hour * 24 )
3540
+ err = cache .TieredCache .Set (cacheKey , ret , utils . Day )
3541
3541
if err != nil {
3542
3542
utils .LogError (err , "Caching contract metadata" , 0 , map [string ]interface {}{"address" : fmt .Sprintf ("%x" , address )})
3543
3543
}
@@ -3565,7 +3565,7 @@ func (bigtable *Bigtable) GetContractMetadata(address []byte) (*types.ContractMe
3565
3565
}
3566
3566
}
3567
3567
3568
- err = cache .TieredCache .Set (cacheKey , ret , time . Hour * 24 )
3568
+ err = cache .TieredCache .Set (cacheKey , ret , utils . Day )
3569
3569
return ret , err
3570
3570
}
3571
3571
@@ -4096,7 +4096,7 @@ func (bigtable *Bigtable) markBalanceUpdate(address []byte, token []byte, mutati
4096
4096
mutations .Keys = append (mutations .Keys , balanceUpdateKey )
4097
4097
mutations .Muts = append (mutations .Muts , mut )
4098
4098
4099
- cache .Set (balanceUpdateCacheKey , []byte {0x1 }, int ((time . Hour * 48 ).Seconds ()))
4099
+ cache .Set (balanceUpdateCacheKey , []byte {0x1 }, int ((utils . Day * 2 ).Seconds ()))
4100
4100
}
4101
4101
}
4102
4102
0 commit comments