Skip to content

Commit

Permalink
fixes after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
ascandone committed Oct 16, 2024
1 parent 9d4e597 commit 8fc7b17
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions internal/controller/ledger/numscript_runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func NewMachineNumscriptRuntimeAdapter(p program.Program) *MachineNumscriptRunti
var _ NumscriptRuntime = (*MachineNumscriptRuntimeAdapter)(nil)

// numscript rewrite implementation
var _ Machine = (*DefaultInterpreterMachineAdapter)(nil)
var _ NumscriptRuntime = (*DefaultInterpreterMachineAdapter)(nil)

type DefaultInterpreterMachineAdapter struct {
parseResult numscript.ParseResult
Expand All @@ -100,7 +100,7 @@ func NewDefaultInterpreterMachineAdapter(parseResult numscript.ParseResult) *Def
}
}

func (d *DefaultInterpreterMachineAdapter) Execute(ctx context.Context, tx TX, vars map[string]string) (*MachineResult, error) {
func (d *DefaultInterpreterMachineAdapter) Execute(ctx context.Context, tx TX, vars map[string]string) (*NumscriptExecutionResult, error) {
execResult, err := d.parseResult.Run(ctx, vars, newNumscriptRewriteAdapter(tx))
if err != nil {
return nil, ErrRuntime{
Expand All @@ -109,7 +109,7 @@ func (d *DefaultInterpreterMachineAdapter) Execute(ctx context.Context, tx TX, v
}
}

return &MachineResult{
return &NumscriptExecutionResult{
Postings: collectionutils.Map(execResult.Postings, func(posting numscript.Posting) ledger.Posting {
return ledger.Posting(posting)
}),
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/system/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (ctrl *DefaultController) GetLedgerController(ctx context.Context, name str
var ledgerController ledgercontroller.Controller = ledgercontroller.NewDefaultController(
*l,
store,
&ledgercontroller.DefaultInterpreterMachineFactory{},
&ledgercontroller.DefaultNumscriptParser{},
ledgercontroller.WithMeter(ctrl.meter),
)

Expand Down
3 changes: 0 additions & 3 deletions test/e2e/api_transactions_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ import (
. "github.com/formancehq/go-libs/v2/testing/api"
"github.com/formancehq/go-libs/v2/testing/platform/pgtesting"

"github.com/formancehq/go-libs/logging"
. "github.com/formancehq/go-libs/testing/api"
"github.com/formancehq/go-libs/testing/platform/pgtesting"
ledger "github.com/formancehq/ledger/internal"
"github.com/formancehq/ledger/internal/bus"
. "github.com/formancehq/ledger/pkg/testserver"
Expand Down

0 comments on commit 8fc7b17

Please sign in to comment.