fix crash(error thrown) on regtest block generation / slightly simplify _if_ for testnet detection
Merge pull request #81 from UdjinM6/110_fix_regtesterror_testnetdetect

fix crash on regtest block generation / slightly simplify _if_ for testnet detection