diff --git a/internal/controller/system/module.go b/internal/controller/system/module.go index 126720dcb..1bc3e76d8 100644 --- a/internal/controller/system/module.go +++ b/internal/controller/system/module.go @@ -40,7 +40,8 @@ func NewFXModule(configuration ModuleConfiguration) fx.Option { })) } - if configuration.NSCacheConfiguration.MaxCount != 0 { + // TEMP enable again + if false && configuration.NSCacheConfiguration.MaxCount != 0 { options = append(options, WithUpdateParser(func(oldParser ledgercontroller.NumscriptParser) ledgercontroller.NumscriptParser { if oldParser == nil { oldParser = ledgercontroller.NewDefaultNumscriptParser() diff --git a/test/e2e/api_bulk.go b/test/e2e/api_bulk.go index 4e07ddb9b..39fc5dbb5 100644 --- a/test/e2e/api_bulk.go +++ b/test/e2e/api_bulk.go @@ -200,8 +200,14 @@ var _ = Context("Ledger engine tests", func() { Expect(err).To(Succeed()) }) It("should respond with an error", func() { + var expectedErr string + if data.numscriptRewrite { + expectedErr = "INTERPRETER_RUNTIME" + } else { + expectedErr = "INSUFFICIENT_FUND" + } Expect(bulkResponse[1].Type).To(Equal(components.V2BulkElementResultType("ERROR"))) - Expect(bulkResponse[1].V2BulkElementResultError.ErrorCode).To(Equal("INTERPRETER_RUNTIME")) + Expect(bulkResponse[1].V2BulkElementResultError.ErrorCode).To(Equal(expectedErr)) }) }) }) diff --git a/test/e2e/api_transactions_create.go b/test/e2e/api_transactions_create.go index bae66b995..6e4fe9d73 100644 --- a/test/e2e/api_transactions_create.go +++ b/test/e2e/api_transactions_create.go @@ -210,8 +210,15 @@ var _ = Context("Ledger accounts list API tests", func() { }} }) It("should fail", func() { + var expectedErr string + if data.numscriptRewrite { + expectedErr = string(components.V2ErrorsEnumInterpreterRuntime) + } else { + expectedErr = string(components.V2ErrorsEnumInsufficientFund) + } + Expect(err).To(HaveOccurred()) - Expect(err).To(HaveErrorCode(string(components.V2ErrorsEnumInterpreterRuntime))) + Expect(err).To(HaveErrorCode(expectedErr)) }) }) When("with nil amount", func() { @@ -334,9 +341,17 @@ var _ = Context("Ledger accounts list API tests", func() { Ledger: "default", } }) - It("should fail with "+string(components.V2ErrorsEnumInterpreterRuntime)+" code", func() { + + var expectedErr string + if data.numscriptRewrite { + expectedErr = string(components.V2ErrorsEnumInterpreterRuntime) + } else { + expectedErr = string(components.V2ErrorsEnumCompilationFailed) + } + + It("should fail with "+expectedErr+" code", func() { Expect(err).NotTo(Succeed()) - Expect(err).To(HaveErrorCode(string(components.V2ErrorsEnumInterpreterRuntime))) + Expect(err).To(HaveErrorCode(expectedErr)) }) }) When("using a negative amount in the script with a variable", func() { @@ -361,9 +376,16 @@ var _ = Context("Ledger accounts list API tests", func() { Ledger: "default", } }) - It("should fail with "+string(components.V2ErrorsEnumInterpreterRuntime)+" code", func() { + + var expectedErr string + if data.numscriptRewrite { + expectedErr = string(components.V2ErrorsEnumInterpreterRuntime) + } else { + expectedErr = string(components.V2ErrorsEnumCompilationFailed) + } + It("should fail with "+expectedErr+" code", func() { Expect(err).NotTo(Succeed()) - Expect(err).To(HaveErrorCode(string(components.V2ErrorsEnumInterpreterRuntime))) + Expect(err).To(HaveErrorCode(expectedErr)) }) }) Context("with error on script", func() { @@ -380,9 +402,15 @@ var _ = Context("Ledger accounts list API tests", func() { Ledger: "default", } }) - It("should fail with "+string(components.V2ErrorsEnumInterpreterParse)+" code", func() { + var expectedErr string + if data.numscriptRewrite { + expectedErr = string(components.V2ErrorsEnumInterpreterParse) + } else { + expectedErr = string(components.V2ErrorsEnumCompilationFailed) + } + It("should fail with "+expectedErr+" code", func() { Expect(err).NotTo(Succeed()) - Expect(err).To(HaveErrorCode(string(components.V2ErrorsEnumInterpreterParse))) + Expect(err).To(HaveErrorCode(expectedErr)) }) }) Context("with no postings", func() { @@ -498,5 +526,4 @@ var _ = Context("Ledger accounts list API tests", func() { }) }) } - })