mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-16 04:24:56 +02:00
Minor fixes.
This commit is contained in:
parent
4c843f16bf
commit
aeac190c94
6 changed files with 17 additions and 18 deletions
|
|
@ -23,7 +23,6 @@ import (
|
|||
api_redis "github.com/eosswedenorg/thalos/api/redis"
|
||||
"github.com/eosswedenorg/thalos/internal/abi"
|
||||
"github.com/eosswedenorg/thalos/internal/cache"
|
||||
. "github.com/eosswedenorg/thalos/internal/cache"
|
||||
"github.com/eosswedenorg/thalos/internal/config"
|
||||
driver "github.com/eosswedenorg/thalos/internal/driver/redis"
|
||||
. "github.com/eosswedenorg/thalos/internal/log"
|
||||
|
|
@ -157,7 +156,7 @@ func LogLevels() []string {
|
|||
}
|
||||
|
||||
func initAbiManager(api *eos.API, store cache.Store, chain_id string) *abi.AbiManager {
|
||||
cache := NewCache("thalos::cache::abi::"+chain_id, store)
|
||||
cache := cache.NewCache("thalos::cache::abi::"+chain_id, store)
|
||||
return abi.NewAbiManager(cache, api)
|
||||
}
|
||||
|
||||
|
|
@ -373,14 +372,14 @@ func serverCmd(cmd *cobra.Command, args []string) {
|
|||
}
|
||||
|
||||
// Setup cache storage
|
||||
cacheStore := NewRedisStore(&redis_cache.Options{
|
||||
cacheStore := cache.NewRedisStore(&redis_cache.Options{
|
||||
Redis: rdb,
|
||||
// Cache 10k keys for 10 minutes.
|
||||
LocalCache: redis_cache.NewTinyLFU(10000, 10*time.Minute),
|
||||
})
|
||||
|
||||
// Setup general cache
|
||||
cache := NewCache("thalos::cache::instance::"+conf.Name, cacheStore)
|
||||
cache := cache.NewCache("thalos::cache::instance::"+conf.Name, cacheStore)
|
||||
|
||||
eosClient := eos.New(conf.Api)
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ var benchCmd = &cobra.Command{
|
|||
Use: "bench",
|
||||
Short: "Run a benchmark against a thalos node",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
var counter int = 0
|
||||
counter := 0
|
||||
interval, _ := cmd.Flags().GetDuration("interval")
|
||||
|
||||
url, _ := cmd.Flags().GetString("redis-url")
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ var RedisACLCmd = &cobra.Command{
|
|||
Short: "create a users.acl file",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
var err error
|
||||
var out *os.File = os.Stdout
|
||||
out := os.Stdout
|
||||
|
||||
rnd = rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ var validateCmd = &cobra.Command{
|
|||
log.WithError(msg).Error("Error when reading stream")
|
||||
case message.ActionTrace:
|
||||
if block_num > 0 {
|
||||
var diff int32 = int32(msg.BlockNum - block_num)
|
||||
diff := int32(msg.BlockNum - block_num)
|
||||
if diff < 0 || diff > 1 {
|
||||
log.WithFields(log.Fields{
|
||||
"current_block": block_num,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue