Skip to content

Commit

Permalink
Fix camelCase
Browse files Browse the repository at this point in the history
  • Loading branch information
jmjac committed Oct 21, 2023
1 parent 2924655 commit 3ce7032
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions pkg/hintrunner/hint.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (hint TestLessThanOrEqual) Execute(vm *VM.VirtualMachine) error {
type LinearSplit struct {
value ResOperander
scalar ResOperander
max_x ResOperander
maxX ResOperander
x CellRefer
y CellRefer
}
Expand All @@ -168,11 +168,11 @@ func (hint LinearSplit) Execute(vm *VM.VirtualMachine) error {
return err
}

max_x, err := hint.max_x.Resolve(vm)
maxX, err := hint.maxX.Resolve(vm)
if err != nil {
return fmt.Errorf("resolve max_x operand %s: %w", hint.max_x, err)
return fmt.Errorf("resolve max_x operand %s: %w", hint.maxX, err)
}
max_xField, err := max_x.FieldElement()
maxXField, err := maxX.FieldElement()
if err != nil {
return err
}
Expand All @@ -181,7 +181,7 @@ func (hint LinearSplit) Execute(vm *VM.VirtualMachine) error {
maxBig := &big.Int{}
scalarField.BigInt(scalarBig)
valueField.BigInt(valueBig)
max_xField.BigInt(maxBig)
maxXField.BigInt(maxBig)

x := (&big.Int{}).Div(valueBig, scalarBig)

Expand Down
8 changes: 4 additions & 4 deletions pkg/hintrunner/hint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ func TestLinearSplit(t *testing.T) {

value := Immediate(*big.NewInt(42*223344 + 14))
scalar := Immediate(*big.NewInt(42))
max_x := Immediate(*big.NewInt(9999999999))
maxX := Immediate(*big.NewInt(9999999999))
var x ApCellRef = 0
var y ApCellRef = 1

hint := LinearSplit{
value: value,
scalar: scalar,
max_x: max_x,
maxX: maxX,
x: x,
y: y,
}
Expand All @@ -205,11 +205,11 @@ func TestLinearSplit(t *testing.T) {
vm.Context.Fp = 0

//Lower max_x
max_x = Immediate(*big.NewInt(223343))
maxX = Immediate(*big.NewInt(223343))
hint = LinearSplit{
value: value,
scalar: scalar,
max_x: max_x,
maxX: maxX,
x: x,
y: y,
}
Expand Down

0 comments on commit 3ce7032

Please sign in to comment.