From cd8497c667d800af6cae060cdb0c580db5f9d8ca Mon Sep 17 00:00:00 2001 From: Chen Chen <34592639+envestcc@users.noreply.github.com> Date: Fri, 22 Mar 2024 08:57:05 +0800 Subject: [PATCH] use buffered channel (#4197) --- actpool/actpool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actpool/actpool.go b/actpool/actpool.go index 2805e46c0f..2b77ec6df8 100644 --- a/actpool/actpool.go +++ b/actpool/actpool.go @@ -436,7 +436,7 @@ func (ap *actPool) context(ctx context.Context) context.Context { } func (ap *actPool) enqueue(ctx context.Context, act *action.SealedEnvelope, replace bool) error { - var errChan = make(chan error) // unused errChan will be garbage-collected + var errChan = make(chan error, 1) // unused errChan will be garbage-collected ap.jobQueue[ap.allocatedWorker(act.SenderAddress())] <- workerJob{ ctx, act,