Really? You sure undefined is normal?
OK because I did the last step to paste the script and it also gave me undefined...in any case, I dont think the script is working. And I did everything OP said to do. What does it look like when it runs?
see this image
https://i.imgur.com/Ym20gEp.pngUndefined is normal. I have had the same message. After then entering startMining(10) it started sending transactions.