fix crash(error thrown) on regtest block generation / slightly simplify _if_ for testnet detection
fix crash(error thrown) on regtest block generation / slightly simplify _if_ for testnet detection

dev1972/Satellitecoin,npccoin/npccoin,ediston/energi,mobicoins/mobicoin-core,thelazier/dash,LIMXTEC/DMDv3,pinkevich/dash,puticcoin/putic,basicincome/unpcoin-core,axelxod/braincoin,midnight-miner/LasVegasCoin,inkvisit/sarmacoins,PIVX-Project/PIVX,mycointest/owncoin,Mrs-X/Darknet,keesdewit82/LasVegasCoin,antcheck/antcoin,schinzelh/dash,alejandromgk/Lunar,willwray/dash,freelion93/mtucicoin,nmarley/dash,projectinterzone/ITZ,terracoin/terracoin,Mrs-X/Darknet,biblepay/biblepay,benzmuircroft/REWIRE.io,inkvisit/sarmacoins,DMDcoin/Diamond,pinkevich/dash,Vsync-project/Vsync,ColossusCoinXT/ColossusCoinXT,ivansib/sibcoin,nmarley/dash,aspirecoin/aspire,PIVX-Project/PIVX,antcheck/antcoin,kbccoin/kbc,slingcoin/sling-market,ArgonToken/ArgonToken,rsdevgun16e/energi,slingcoin/sling-market,grumpydevelop/singularity,dashpay/dash,terracoin/terracoin,keesdewit82/LasVegasCoin,Petr-Economissa/gvidon,RyanLucchese/energi,xuyangcn/opalcoin,diggcoin/diggcoin,diggcoin/diggcoin,crowning-/dash,PIVX-Project/PIVX,nmarley/dash,ediston/energi,ahmedbodi/test2,LIMXTEC/DMDv3,ediston/energi,dev1972/Satellitecoin,jmgilbert2/energi,crowning-/dash,LIMXTEC/DMDv3,Mrs-X/PIVX,coinkeeper/2015-06-22_18-36_darkcoin,Darknet-Crypto/Darknet,biblepay/biblepay,nmarley/dash,cerebrus29301/crowncoin,Mrs-X/PIVX,48thct2jtnf/P,rdqw/sscoin,UdjinM6/dash,knolza/gamblr,dmrtsvetkov/flowercoin,rdqw/sscoin,diggcoin/diggcoin,npccoin/npccoin,axelxod/braincoin,antcheck/antcoin,ionomy/ion,rdqw/sscoin,HeliumGas/helium,mycointest/owncoin,Darknet-Crypto/Darknet,midnight-miner/LasVegasCoin,pelorusjack/BlockDX,biblepay/biblepay,projectinterzone/ITZ,basicincome/unpcoin-core,PandaPayProject/PandaPay,midnight-miner/LasVegasCoin,ColossusCoinXT/ColossusCoinXT,axelxod/braincoin,RyanLucchese/energi,world-bank/unpay-core,ediston/energi,projectinterzone/ITZ,rsdevgun16e/energi,dashpay/dash,DMDcoin/Diamond,worldbit/worldbit,ArgonToken/ArgonToken,ahmedbodi/test2,benzmuircroft/REWIRE.io,Vsync-project/Vsync,ArgonToken/ArgonToken,putinclassic/putic,freelion93/mtucicoin,antcheck/antcoin,alejandromgk/Lunar,pinkevich/dash,slingcoin/sling-market,grumpydevelop/singularity,biblepay/biblepay,npccoin/npccoin,UdjinM6/dash,ArgonToken/ArgonToken,dashpay/dash,willwray/dash,Bloom-Project/Bloom,dev1972/Satellitecoin,ahmedbodi/test2,world-bank/unpay-core,npccoin/npccoin,LIMXTEC/DMDv3,jmgilbert2/energi,crowning2/dash,dashpay/dash,diggcoin/diggcoin,pinkevich/dash,ivansib/sib16,putinclassic/putic,ionomy/ion,Mrs-X/Darknet,kbccoin/kbc,Petr-Economissa/gvidon,inkvisit/sarmacoins,ticclassic/ic,world-bank/unpay-core,mobicoins/mobicoin-core,putinclassic/putic,PIVX-Project/PIVX,xuyangcn/opalcoin,LIMXTEC/DMDv3,pelorusjack/BlockDX,coinkeeper/2015-06-22_18-36_darkcoin,aspirecoin/aspire,grumpydevelop/singularity,crowning2/dash,UdjinM6/dash,kbccoin/kbc,PandaPayProject/PandaPay,aspirecoin/aspire,freelion93/mtucicoin,benzmuircroft/REWIRE.io,alejandromgk/Lunar,schinzelh/dash,presstab/PIVX,crowning2/dash,mobicoins/mobicoin-core,aspirecoin/aspire,nmarley/dash,Mrs-X/PIVX,RyanLucchese/energi,willwray/dash,projectinterzone/ITZ,Mrs-X/PIVX,terracoin/terracoin,48thct2jtnf/P,dev1972/Satellitecoin,CoinProjects/AmsterdamCoin-v4,schinzelh/dash,ahmedbodi/test2,benzmuircroft/REWIRE.io,coinkeeper/2015-06-22_18-36_darkcoin,ivansib/sib16,LIMXTEC/DMDv3,pelorusjack/BlockDX,ionomy/ion,biblepay/biblepay,DMDcoin/Diamond,cryptodev35/icash,midnight-miner/LasVegasCoin,ticclassic/ic,lakepay/lake,PIVX-Project/PIVX,DMDcoin/Diamond,midnight-miner/LasVegasCoin,ArgonToken/ArgonToken,worldbit/worldbit,coinkeeper/2015-06-22_18-36_darkcoin,willwray/dash,ColossusCoinXT/ColossusCoinXT,knolza/gamblr,worldbit/worldbit,putinclassic/putic,worldbit/worldbit,ivansib/sibcoin,Bloom-Project/Bloom,terracoin/terracoin,rsdevgun16e/energi,lakepay/lake,putinclassic/putic,nightlydash/darkcoin,nmarley/dash,blood2/bloodcoin-0.9,Petr-Economissa/gvidon,CoinProjects/AmsterdamCoin-v4,BlockchainTechLLC/3dcoin,antcheck/antcoin,PIVX-Project/PIVX,basicincome/unpcoin-core,Vsync-project/Vsync,presstab/PIVX,ColossusCoinXT/ColossusCoinXT,RyanLucchese/energi,puticcoin/putic,ivansib/sib16,Bloom-Project/Bloom,puticcoin/putic,ivansib/sibcoin,terracoin/terracoin,schinzelh/dash,crowning-/dash,ticclassic/ic,freelion93/mtucicoin,puticcoin/putic,CoinProjects/AmsterdamCoin-v4,UdjinM6/dash,Mrs-X/PIVX,diggcoin/diggcoin,alejandromgk/Lunar,presstab/PIVX,HeliumGas/helium,jmgilbert2/energi,PandaPayProject/PandaPay,mycointest/owncoin,knolza/gamblr,ticclassic/ic,keesdewit82/LasVegasCoin,kbccoin/kbc,inkvisit/sarmacoins,thelazier/dash,HeliumGas/helium,axelxod/braincoin,putinclassic/putic,Darknet-Crypto/Darknet,xuyangcn/opalcoin,schinzelh/dash,willwray/dash,cerebrus29301/crowncoin,world-bank/unpay-core,keesdewit82/LasVegasCoin,jmgilbert2/energi,ivansib/sibcoin,dmrtsvetkov/flowercoin,biblepay/biblepay,cryptodev35/icash,ColossusCoinXT/ColossusCoinXT,freelion93/mtucicoin,crowning2/dash,Mrs-X/PIVX,BlockchainTechLLC/3dcoin,slingcoin/sling-market,ionomy/ion,Darknet-Crypto/Darknet,nightlydash/darkcoin,blood2/bloodcoin-0.9,thelazier/dash,world-bank/unpay-core,cerebrus29301/crowncoin,inkvisit/sarmacoins,48thct2jtnf/P,ColossusCoinXT/ColossusCoinXT,ionomy/ion,basicincome/unpcoin-core,dmrtsvetkov/flowercoin,blood2/bloodcoin-0.9,Bloom-Project/Bloom,xuyangcn/opalcoin,BlockchainTechLLC/3dcoin,mobicoins/mobicoin-core,projectinterzone/ITZ,48thct2jtnf/P,terracoin/terracoin,nmarley/dash,CoinProjects/AmsterdamCoin-v4,axelxod/braincoin,nightlydash/darkcoin,presstab/PIVX,presstab/PIVX,Petr-Economissa/gvidon,rdqw/sscoin,dmrtsvetkov/flowercoin,CoinProjects/AmsterdamCoin-v4,thelazier/dash,48thct2jtnf/P,jmgilbert2/energi,pelorusjack/BlockDX,ivansib/sibcoin,mobicoins/mobicoin-core,nightlydash/darkcoin,ivansib/sib16,rsdevgun16e/energi,grumpydevelop/singularity,coinkeeper/2015-06-22_18-36_darkcoin,aspirecoin/aspire,slingcoin/sling-market,ivansib/sib16,presstab/PIVX,rsdevgun16e/energi,HeliumGas/helium,crowning-/dash,midnight-miner/LasVegasCoin,ediston/energi,crowning-/dash,biblepay/biblepay,cryptodev35/icash,pinkevich/dash,ivansib/sib16,dev1972/Satellitecoin,pelorusjack/BlockDX,Darknet-Crypto/Darknet,ionomy/ion,worldbit/worldbit,ticclassic/ic,dev1972/Satellitecoin,PandaPayProject/PandaPay,rdqw/sscoin,inkvisit/sarmacoins,keesdewit82/LasVegasCoin,pinkevich/dash,diggcoin/diggcoin,Mrs-X/Darknet,Vsync-project/Vsync,knolza/gamblr,48thct2jtnf/P,ArgonToken/ArgonToken,DMDcoin/Diamond,dmrtsvetkov/flowercoin,grumpydevelop/singularity,BlockchainTechLLC/3dcoin,benzmuircroft/REWIRE.io,blood2/bloodcoin-0.9,ivansib/sibcoin,Mrs-X/Darknet,lakepay/lake,freelion93/mtucicoin,cryptodev35/icash,slingcoin/sling-market,xuyangcn/opalcoin,nightlydash/darkcoin,axelxod/braincoin,crowning-/dash,Mrs-X/Darknet,PandaPayProject/PandaPay,mycointest/owncoin,BlockchainTechLLC/3dcoin,jmgilbert2/energi,ahmedbodi/test2,Vsync-project/Vsync,lakepay/lake,thelazier/dash,kbccoin/kbc,xuyangcn/opalcoin,willwray/dash,lakepay/lake,keesdewit82/LasVegasCoin,alejandromgk/Lunar,biblepay/biblepay,lakepay/lake,Bloom-Project/Bloom,knolza/gamblr,rdqw/sscoin,ticclassic/ic,schinzelh/dash,DMDcoin/Diamond,dmrtsvetkov/flowercoin,cerebrus29301/crowncoin,puticcoin/putic,HeliumGas/helium,blood2/bloodcoin-0.9,puticcoin/putic,BlockchainTechLLC/3dcoin,pelorusjack/BlockDX,worldbit/worldbit,cerebrus29301/crowncoin,crowning2/dash,benzmuircroft/REWIRE.io,rsdevgun16e/energi,mycointest/owncoin,knolza/gamblr,aspirecoin/aspire,RyanLucchese/energi,cryptodev35/icash,npccoin/npccoin,ahmedbodi/test2,basicincome/unpcoin-core,ediston/energi,Darknet-Crypto/Darknet,Bloom-Project/Bloom,CoinProjects/AmsterdamCoin-v4,PIVX-Project/PIVX,antcheck/antcoin,PIVX-Project/PIVX,grumpydevelop/singularity,alejandromgk/Lunar,HeliumGas/helium,dashpay/dash,Petr-Economissa/gvidon,mycointest/owncoin,Vsync-project/Vsync,npccoin/npccoin,UdjinM6/dash,RyanLucchese/energi,PIVX-Project/PIVX,PandaPayProject/PandaPay,cerebrus29301/crowncoin,Petr-Economissa/gvidon