style: format code with gofmt
This commit is contained in:
@@ -13,12 +13,12 @@ import (
|
||||
|
||||
// PoolBlacklist manages a list of pools that consistently fail
|
||||
type PoolBlacklist struct {
|
||||
mu sync.RWMutex
|
||||
logger *logger.Logger
|
||||
blacklist map[common.Address]*BlacklistEntry
|
||||
mu sync.RWMutex
|
||||
logger *logger.Logger
|
||||
blacklist map[common.Address]*BlacklistEntry
|
||||
failureThreshold int
|
||||
failureWindow time.Duration
|
||||
persistFile string
|
||||
failureWindow time.Duration
|
||||
persistFile string
|
||||
}
|
||||
|
||||
// BlacklistEntry represents a blacklisted pool
|
||||
@@ -39,8 +39,8 @@ func NewPoolBlacklist(logger *logger.Logger) *PoolBlacklist {
|
||||
pb := &PoolBlacklist{
|
||||
logger: logger,
|
||||
blacklist: make(map[common.Address]*BlacklistEntry),
|
||||
failureThreshold: 5, // Blacklist after 5 failures
|
||||
failureWindow: time.Hour, // Within 1 hour
|
||||
failureThreshold: 5, // Blacklist after 5 failures
|
||||
failureWindow: time.Hour, // Within 1 hour
|
||||
persistFile: "logs/pool_blacklist.json",
|
||||
}
|
||||
|
||||
@@ -398,4 +398,4 @@ func (pb *PoolBlacklist) GetBlacklistedPools() []common.Address {
|
||||
}
|
||||
}
|
||||
return pools
|
||||
}
|
||||
}
|
||||
|
||||
@@ -347,4 +347,4 @@ func (f *PoolFactory) GetPoolInfo(ctx context.Context, poolAddress common.Addres
|
||||
"reserve0": reserve0.String(),
|
||||
"reserve1": reserve1.String(),
|
||||
}, nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user