@@ -27,8 +27,6 @@ const (
2727
2828 DefaultConcurrentKeygen = 2
2929 DefaultConcurrentSigning = 20
30- DefaultSessionWarmUpDelay = 200
31-
3230 KeyGenTimeOut = 30 * time .Second
3331)
3432
@@ -55,8 +53,6 @@ type eventConsumer struct {
5553 signingMsgBuffer chan * nats.Msg
5654 maxConcurrentKeygen int
5755 maxConcurrentSigning int
58- sessionWarmUpDelayMs int
59-
6056 // Track active sessions with timestamps for cleanup
6157 activeSessions map [string ]time.Time // Maps "walletID-txID" to creation time
6258 sessionsLock sync.RWMutex
@@ -83,19 +79,12 @@ func NewEventConsumer(
8379 maxConcurrentSigning = DefaultConcurrentSigning
8480 }
8581
86- sessionWarmUpDelayMs := viper .GetInt ("session_warm_up_delay_ms" )
87- if sessionWarmUpDelayMs == 0 {
88- sessionWarmUpDelayMs = DefaultSessionWarmUpDelay
89- }
90-
9182 logger .Info (
9283 "Initializing event consumer" ,
9384 "max_concurrent_keygen" ,
9485 maxConcurrentKeygen ,
9586 "max_concurrent_signing" ,
9687 maxConcurrentSigning ,
97- "session_warm_up_delay_ms" ,
98- sessionWarmUpDelayMs ,
9988 )
10089
10190 ec := & eventConsumer {
@@ -114,7 +103,6 @@ func NewEventConsumer(
114103 identityStore : identityStore ,
115104 keygenMsgBuffer : make (chan * nats.Msg , 100 ),
116105 signingMsgBuffer : make (chan * nats.Msg , 200 ), // Larger buffer for signing
117- sessionWarmUpDelayMs : sessionWarmUpDelayMs ,
118106 }
119107
120108 go ec .startKeyGenEventWorker ()
@@ -144,10 +132,6 @@ func (ec *eventConsumer) Run() {
144132 logger .Info ("MPC Event consumer started...!" )
145133}
146134
147- func (ec * eventConsumer ) warmUpSession () {
148- time .Sleep (time .Duration (ec .sessionWarmUpDelayMs ) * time .Millisecond )
149- }
150-
151135func (ec * eventConsumer ) handleKeyGenEvent (natMsg * nats.Msg ) {
152136 baseCtx , baseCancel := context .WithTimeout (context .Background (), KeyGenTimeOut )
153137 defer baseCancel ()
0 commit comments