File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -1014,13 +1014,22 @@ impl CairoRunner {
10141014 pub fn get_builtin_segments_info ( & self ) -> Result < Vec < ( usize , usize ) > , RunnerError > {
10151015 let mut builtin_segment_info = Vec :: new ( ) ;
10161016
1017+ let proof_mode = self . is_proof_mode ( ) ;
1018+
10171019 for builtin in & self . vm . builtin_runners {
10181020 let ( index, stop_ptr) = builtin. get_memory_segment_addresses ( ) ;
10191021
1020- builtin_segment_info. push ( (
1021- index,
1022- stop_ptr. ok_or_else ( || RunnerError :: NoStopPointer ( Box :: new ( builtin. name ( ) ) ) ) ?,
1023- ) ) ;
1022+ if proof_mode {
1023+ // proof‐mode: only push if `stop_ptr` is Some
1024+ if let Some ( stop_ptr) = stop_ptr {
1025+ builtin_segment_info. push ( ( index, stop_ptr) ) ;
1026+ }
1027+ } else {
1028+ // non‐proof mode: error if `stop_ptr` is None
1029+ let stop_ptr =
1030+ stop_ptr. ok_or_else ( || RunnerError :: NoStopPointer ( Box :: new ( builtin. name ( ) ) ) ) ?;
1031+ builtin_segment_info. push ( ( index, stop_ptr) ) ;
1032+ }
10241033 }
10251034
10261035 Ok ( builtin_segment_info)
You can’t perform that action at this time.
0 commit comments