[test] Throw error instead of segfaulting in failure scenario
[test] Throw error instead of segfaulting in failure scenario

If the miner code is faulty and does not include any transactions in a block,
the code segfaults when it tries to access block transactions. Instead, add a
check that safely aborts the process.

namecoin/namecore,prusnak/bitcoin,jlopp/statoshi,yenliangl/bitcoin,dscotese/bitcoin,Sjors/bitcoin,fujicoin/fujicoin,kallewoof/bitcoin,mruddy/bitcoin,instagibbs/bitcoin,yenliangl/bitcoin,apoelstra/bitcoin,bitcoin/bitcoin,qtumproject/qtum,achow101/bitcoin,instagibbs/bitcoin,bitcoinsSG/bitcoin,namecoin/namecoin-core,tecnovert/particl-core,bitcoinsSG/bitcoin,GroestlCoin/bitcoin,mruddy/bitcoin,Xekyo/bitcoin,apoelstra/bitcoin,tecnovert/particl-core,prusnak/bitcoin,yenliangl/bitcoin,GroestlCoin/GroestlCoin,sipsorcery/bitcoin,JeremyRubin/bitcoin,MeshCollider/bitcoin,anditto/bitcoin,MeshCollider/bitcoin,rnicoll/bitcoin,ajtowns/bitcoin,sstone/bitcoin,sipsorcery/bitcoin,fanquake/bitcoin,jamesob/bitcoin,AkioNak/bitcoin,ajtowns/bitcoin,ElementsProject/elements,domob1812/bitcoin,domob1812/namecore,dscotese/bitcoin,MarcoFalke/bitcoin,sipsorcery/bitcoin,jambolo/bitcoin,fujicoin/fujicoin,andreaskern/bitcoin,MarcoFalke/bitcoin,MarcoFalke/bitcoin,tecnovert/particl-core,sipsorcery/bitcoin,AkioNak/bitcoin,Xekyo/bitcoin,sipsorcery/bitcoin,domob1812/bitcoin,fanquake/bitcoin,dscotese/bitcoin,ajtowns/bitcoin,JeremyRubin/bitcoin,namecoin/namecore,prusnak/bitcoin,namecoin/namecoin-core,particl/particl-core,jambolo/bitcoin,GroestlCoin/GroestlCoin,bitcoin/bitcoin,mm-s/bitcoin,Sjors/bitcoin,dscotese/bitcoin,qtumproject/qtum,jambolo/bitcoin,n1bor/bitcoin,sstone/bitcoin,andreaskern/bitcoin,jlopp/statoshi,kallewoof/bitcoin,sstone/bitcoin,mruddy/bitcoin,Sjors/bitcoin,GroestlCoin/GroestlCoin,GroestlCoin/GroestlCoin,andreaskern/bitcoin,namecoin/namecore,achow101/bitcoin,mm-s/bitcoin,bitcoin/bitcoin,JeremyRubin/bitcoin,tecnovert/particl-core,rnicoll/bitcoin,kallewoof/bitcoin,dscotese/bitcoin,dscotese/bitcoin,ElementsProject/elements,achow101/bitcoin,n1bor/bitcoin,AkioNak/bitcoin,ajtowns/bitcoin,achow101/bitcoin,anditto/bitcoin,Xekyo/bitcoin,mruddy/bitcoin,rnicoll/bitcoin,ElementsProject/elements,anditto/bitcoin,particl/particl-core,instagibbs/bitcoin,fanquake/bitcoin,AkioNak/bitcoin,namecoin/namecore,MeshCollider/bitcoin,domob1812/namecore,pataquets/namecoin-core,jlopp/statoshi,instagibbs/bitcoin,GroestlCoin/bitcoin,GroestlCoin/bitcoin,bitcoinknots/bitcoin,jamesob/bitcoin,kallewoof/bitcoin,sipsorcery/bitcoin,fujicoin/fujicoin,MeshCollider/bitcoin,domob1812/namecore,MarcoFalke/bitcoin,fanquake/bitcoin,anditto/bitcoin,apoelstra/bitcoin,bitcoinsSG/bitcoin,ElementsProject/elements,AkioNak/bitcoin,particl/particl-core,sstone/bitcoin,GroestlCoin/GroestlCoin,sstone/bitcoin,AkioNak/bitcoin,yenliangl/bitcoin,andreaskern/bitcoin,jlopp/statoshi,yenliangl/bitcoin,apoelstra/bitcoin,JeremyRubin/bitcoin,JeremyRubin/bitcoin,bitcoinknots/bitcoin,jlopp/statoshi,particl/particl-core,jamesob/bitcoin,lateminer/bitcoin,JeremyRubin/bitcoin,jamesob/bitcoin,Sjors/bitcoin,mm-s/bitcoin,domob1812/namecore,fanquake/bitcoin,GroestlCoin/bitcoin,jambolo/bitcoin,qtumproject/qtum,Xekyo/bitcoin,bitcoin/bitcoin,domob1812/bitcoin,apoelstra/bitcoin,fujicoin/fujicoin,namecoin/namecore,mruddy/bitcoin,namecoin/namecore,bitcoinknots/bitcoin,jlopp/statoshi,bitcoin/bitcoin,fujicoin/fujicoin,qtumproject/qtum,GroestlCoin/bitcoin,prusnak/bitcoin,mm-s/bitcoin,bitcoinsSG/bitcoin,GroestlCoin/GroestlCoin,pataquets/namecoin-core,particl/particl-core,particl/particl-core,Xekyo/bitcoin,n1bor/bitcoin,tecnovert/particl-core,ajtowns/bitcoin,namecoin/namecoin-core,fanquake/bitcoin,qtumproject/qtum,pataquets/namecoin-core,qtumproject/qtum,n1bor/bitcoin,mm-s/bitcoin,lateminer/bitcoin,kallewoof/bitcoin,n1bor/bitcoin,domob1812/bitcoin,Sjors/bitcoin,kallewoof/bitcoin,namecoin/namecoin-core,jambolo/bitcoin,jamesob/bitcoin,tecnovert/particl-core,andreaskern/bitcoin,mruddy/bitcoin,bitcoinknots/bitcoin,ajtowns/bitcoin,anditto/bitcoin,MarcoFalke/bitcoin,bitcoin/bitcoin,domob1812/bitcoin,bitcoinknots/bitcoin,domob1812/bitcoin,domob1812/namecore,MarcoFalke/bitcoin,rnicoll/bitcoin,pataquets/namecoin-core,achow101/bitcoin,fujicoin/fujicoin,bitcoinsSG/bitcoin,lateminer/bitcoin,rnicoll/bitcoin,yenliangl/bitcoin,domob1812/namecore,ElementsProject/elements,apoelstra/bitcoin,instagibbs/bitcoin,jambolo/bitcoin,MeshCollider/bitcoin,prusnak/bitcoin,bitcoinsSG/bitcoin,sstone/bitcoin,pataquets/namecoin-core,MeshCollider/bitcoin,mm-s/bitcoin,Xekyo/bitcoin,lateminer/bitcoin,qtumproject/qtum,n1bor/bitcoin,instagibbs/bitcoin,lateminer/bitcoin,ElementsProject/elements,lateminer/bitcoin,namecoin/namecoin-core,rnicoll/bitcoin,GroestlCoin/bitcoin,pataquets/namecoin-core,achow101/bitcoin,andreaskern/bitcoin,namecoin/namecoin-core,jamesob/bitcoin,anditto/bitcoin,prusnak/bitcoin