style: format code with gofmt

This commit is contained in:
Krypto Kajun
2025-11-08 10:37:52 -06:00
parent 8cba462024
commit ae4abc5b5c
32 changed files with 9207 additions and 5843 deletions

View File

@@ -68,7 +68,7 @@ type ArbitrageDetectionEngine struct {
// CRITICAL FIX: Backpressure for opportunity handlers
// Prevents unbounded goroutine creation under high opportunity rate
handlerSemaphore chan struct{} // Limits concurrent handler executions
maxHandlers int // Maximum concurrent handler goroutines
maxHandlers int // Maximum concurrent handler goroutines
}
// DetectionConfig contains all configuration parameters for the arbitrage detection engine.
@@ -159,8 +159,8 @@ func NewArbitrageDetectionEngine(
isRunning: false,
stopChan: make(chan struct{}),
opportunityChan: make(chan *types.ArbitrageOpportunity, 1000), // Buffered channel
maxHandlers: 10, // CRITICAL FIX: Limit to 10 concurrent handlers
handlerSemaphore: make(chan struct{}, 10), // CRITICAL FIX: Backpressure semaphore
maxHandlers: 10, // CRITICAL FIX: Limit to 10 concurrent handlers
handlerSemaphore: make(chan struct{}, 10), // CRITICAL FIX: Backpressure semaphore
}
// Set default configuration if not provided

View File

@@ -96,7 +96,7 @@ func NewMultiHopScanner(logger *logger.Logger, client *ethclient.Client, poolDis
cacheExpiry: time.Second * 30, // Cache for 30 seconds only - REDUCED for fresh opportunities
reserveCache: reserveCache, // ADDED: Reserve cache
tokenGraph: NewTokenGraph(),
poolDiscovery: poolDiscovery, // CRITICAL FIX: Store pool discovery for loading cached pools
poolDiscovery: poolDiscovery, // CRITICAL FIX: Store pool discovery for loading cached pools
pools: make(map[common.Address]*PoolInfo),
}

View File

@@ -80,11 +80,11 @@ type ArbitrageDatabase interface {
// ArbitrageService is a sophisticated arbitrage service with comprehensive MEV detection
// Now integrated with the complete MEV bot architecture
type ArbitrageService struct {
client *ethclient.Client
logger *logger.Logger
config *config.ArbitrageConfig // Legacy arbitrage config
fullConfig *config.Config // Full config for L2 optimizations
keyManager *security.KeyManager
client *ethclient.Client
logger *logger.Logger
config *config.ArbitrageConfig // Legacy arbitrage config
fullConfig *config.Config // Full config for L2 optimizations
keyManager *security.KeyManager
// Core components (legacy)
multiHopScanner *MultiHopScanner