@@ -5,15 +5,16 @@ import (
55 "errors"
66 "math/big"
77
8+ "github.com/ledgerwatch/log/v3"
9+ "golang.org/x/sync/semaphore"
10+ "google.golang.org/protobuf/types/known/emptypb"
11+
812 "github.com/ledgerwatch/erigon-lib/chain"
913 libcommon "github.com/ledgerwatch/erigon-lib/common"
1014 "github.com/ledgerwatch/erigon-lib/gointerfaces"
1115 "github.com/ledgerwatch/erigon-lib/gointerfaces/execution"
1216 "github.com/ledgerwatch/erigon-lib/kv/dbutils"
1317 "github.com/ledgerwatch/erigon-lib/wrap"
14- "github.com/ledgerwatch/log/v3"
15- "golang.org/x/sync/semaphore"
16- "google.golang.org/protobuf/types/known/emptypb"
1718
1819 "github.com/ledgerwatch/erigon-lib/kv"
1920 "github.com/ledgerwatch/erigon/common/math"
@@ -150,6 +151,7 @@ func (e *EthereumExecutionModule) canonicalHash(ctx context.Context, tx kv.Tx, b
150151
151152func (e * EthereumExecutionModule ) ValidateChain (ctx context.Context , req * execution.ValidationRequest ) (* execution.ValidationReceipt , error ) {
152153 if ! e .semaphore .TryAcquire (1 ) {
154+ e .logger .Warn ("ethereumExecutionModule.ValidateChain: ExecutionStatus_Busy" )
153155 return & execution.ValidationReceipt {
154156 LatestValidHash : gointerfaces .ConvertHashToH256 (libcommon.Hash {}),
155157 ValidationStatus : execution .ExecutionStatus_Busy ,
@@ -267,6 +269,7 @@ func (e *EthereumExecutionModule) Start(ctx context.Context) {
267269
268270func (e * EthereumExecutionModule ) Ready (context.Context , * emptypb.Empty ) (* execution.ReadyResponse , error ) {
269271 if ! e .semaphore .TryAcquire (1 ) {
272+ e .logger .Warn ("ethereumExecutionModule.Ready: ExecutionStatus_Busy" )
270273 return & execution.ReadyResponse {Ready : false }, nil
271274 }
272275 defer e .semaphore .Release (1 )
0 commit comments