Miner Implementation

please explain to me like im a 5yo, why the miner runs for a set period of time instead of being told to run/cancel/reset

Are you referring to a specific log message? It’s likely misleading, it’s just a loop until we check for new transactions again. But the miner keeps running forever until you stop it.

so the loop just runs for 90 seconds and then checks for new transactions? if a valid block arrives for valid transactions wont the loop be superfluous?

Right, there are other exit conditions, like a new block arriving.

Oh okay, that’s good.