diff --git a/core/capabilities/remote/executable/request/client_request_test.go b/core/capabilities/remote/executable/request/client_request_test.go index 3c843cf038b..c46fd1363a0 100644 --- a/core/capabilities/remote/executable/request/client_request_test.go +++ b/core/capabilities/remote/executable/request/client_request_test.go @@ -6,7 +6,6 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/common/hexutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -26,13 +25,6 @@ const ( workflowExecutionID1 = "95ef5e32deb99a10ee6804bc4af13855687559d7ff6552ac6dbb2ce0abbadeed" ) -func Test_Hex(t *testing.T) { - b := []byte{} - - strResult := hexutil.Encode(b) - assert.Equal(t, "", strResult) -} - func Test_ClientRequest_MessageValidation(t *testing.T) { lggr := logger.TestLogger(t) diff --git a/core/services/workflows/syncer/workflow_registry.go b/core/services/workflows/syncer/workflow_registry.go index fbbaa2e6207..e68136fdc07 100644 --- a/core/services/workflows/syncer/workflow_registry.go +++ b/core/services/workflows/syncer/workflow_registry.go @@ -223,11 +223,16 @@ func (w *workflowRegistry) Start(_ context.Context) error { w.lggr.Debugw("Loading initial workflows for DON", "DON", don.ID) loadWorkflowsHead, err := w.initialWorkflowsStateLoader.LoadWorkflows(ctx, don) if err != nil { - // TODO - this is a temporary fix to handle the case where the contract is empty, to track: https://smartcontract-it.atlassian.net/browse/CAPPL-393 + // TODO - this is a temporary fix to handle the case where the chainreader errors because the contract + // contains no workflows. To track: https://smartcontract-it.atlassian.net/browse/CAPPL-393 if !strings.Contains(err.Error(), "attempting to unmarshal an empty string while arguments are expected") { w.lggr.Errorw("failed to load workflows", "err", err) return } + + loadWorkflowsHead = &types.Head{ + Height: "0", + } } reader, err := w.getContractReader(ctx)