займ на карту онлайн кредит банк

`geth js <javscript>` seems to ignore the javascript when run as a subprocess

0

I’m trying to run a private mining network for testing purposes for a website, but I’d like to only have the mining network “mine when needed” to keep the memory footprint of my test blockchain low. For this reason, in console mode I run a script called mineWhenNeeded.js, available here.

When I run geth console with the arguments listed below, I get that the mining is functioning correctly, starting when transactions are listed and stopping when there are no transactions left to process. However, when I run geth js with the below Popen command:

miner_process = subprocess.Popen(             [                 "geth",                 "--datadir", datadir,                 "--networkid", networkid,                 "--nodiscover",                 "--port", discPort,                 "--rpc",                 "--rpcport", rpcPort,                 "--rpcapi", "admin,eth,miner,personal,web3"                 "--nat", "none",                 "--lightserv", "90",                 "--etherbase", "0x13ec78bf464b00a400253e795e2f8ca0da68185c",                 "js", "~/my-eth-chain/mineWhenNeeded.js"             ]) 

mining never starts, and none of my test transactions get run – although I’m able to connect fine via a test rpc connection. Is there some other way this should be done?

If I change the last arguments to:

                ....                 "--mine",                 "--minerthreads", "1" 

It still does not mine, what gives?