Require scriptPubKeyIn size > 0 in miner.cpp

This commit is contained in:
jl777
2018-12-14 01:39:32 -11:00
parent d3cb22caea
commit 6afa732047

View File

@@ -148,7 +148,7 @@ CBlockTemplate* CreateNewBlock(const CScript& _scriptPubKeyIn, int32_t gpucount,
CPubKey pk = CPubKey();
std::vector<std::vector<unsigned char>> vAddrs;
txnouttype txT;
if (Solver(scriptPubKeyIn, txT, vAddrs))
if ( scriptPubKeyIn.size() > 0 && Solver(scriptPubKeyIn, txT, vAddrs))
{
if (txT == TX_PUBKEY)
pk = CPubKey(vAddrs[0]);