Skip to content

Commit

Permalink
Fixes for the integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MaksymMalicki committed Feb 21, 2025
1 parent 795c82a commit ef6d244
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,10 @@ func (runner *Runner) RunFor(steps uint64) error {
// Since this vm always finishes the run of the program at the number of steps that is a power of two in the proof mode,
// there is no need to run additional steps before the loop.
func (runner *Runner) EndRun() error {
if err := runner.RelocateTemporarySegments(); err != nil {
return err
if runner.runnerMode == ProofModeCairo {
if err := runner.RelocateTemporarySegments(); err != nil {
return err
}
}
for runner.checkUsedCells() != nil {
pow2Steps := utils.NextPowerOfTwo(runner.vm.Step + 1)
Expand Down
2 changes: 1 addition & 1 deletion pkg/vm/memory/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ func (memory *Memory) AddRelocationRule(segmentIndex int, addr MemoryAddress) {

func (memory *Memory) RelocateTemporarySegments() error {
if len(memory.relocationRules) == 0 || len(memory.TemporarySegments) == 0 {
return fmt.Errorf("no relocation rules or temporary segments")
return nil
}
for i, segment := range memory.Segments {
for j := uint64(0); j < segment.RealLen(); j++ {
Expand Down

0 comments on commit ef6d244

Please sign in to comment.