From 959360e7b394109e620d73e0c85d33f084956d0b Mon Sep 17 00:00:00 2001 From: ramil Date: Thu, 2 May 2024 21:57:40 +0300 Subject: [PATCH] fix static check error: should use for range instead of for { select {} } (S1000) https://github.com/dominikh/go-tools/issues/503#issuecomment-497020529 --- vm/vm.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vm/vm.go b/vm/vm.go index 6ab71e0..fa520d3 100644 --- a/vm/vm.go +++ b/vm/vm.go @@ -339,10 +339,8 @@ func (vm *LandslideVM) Initialize(_ context.Context, req *vmpb.InitializeRequest go func() { for { - select { - case <-vm.mempool.TxsAvailable(): - vm.toEngine <- messengerpb.Message_MESSAGE_BUILD_BLOCK - } + <-vm.mempool.TxsAvailable() + vm.toEngine <- messengerpb.Message_MESSAGE_BUILD_BLOCK } }()