#Why is this looping infinitely?

22 messages · Page 1 of 1 (latest)

tired dove
#

it is tough to read your code from screenshots. Can you share your ode directly or on playground or paste.rs?

#

-code

rustic crowBOT
#

Please post your code examples and compiler output with code fences (```) around them. Example:
```rust
let (x, y) = (0, 42);
println!("Position at {}, {}", x, y);
```

let (x, y) = (0, 42);
println!("Position at {}, {}", x, y);

If the snippet is long or you want to demonstrate something, consider sharing it through the playground: https://play.rust-lang.org/ or https://www.rustexplorer.com/ or https://paste.rs/web.
Please avoid sharing screenshots of your code, as they're not very accessible. Using code fences or a shared snippet makes the code more readable and allows those helping you to copy-paste the code to help explain things.

tired dove
#

first send the concerned looping function

lost quest
#

those are the 3 main fns

tired dove
#

do one thing place a debug statement in the loop after setting status and see what value you get

lost quest
#

i think recursive_path_recalculation is the problem

#

always true

tired dove
#

do the same thing in that function

lost quest
#

example?

tired dove
#

so your function returns true if calculate path returns a some of some path is it doing that?

lost quest
#

like a profitable path

#

and the reserves would be updated

#

could it be im not dereferencing?

tired dove
#

is the function behaving as you are thinking it is?

lost quest
#

i believe so

#

apart from from the short circuit part

lost quest
tired dove
#

cool

lost quest
#

it's because i was using a clone of shadow_paths and needed to update the original shadow_paths w/ new_paths