Merge pull request #1173 from blackjok3rtt/FSM

fix miner lock when run out of utxo
This commit is contained in:
jl777
2019-01-11 04:29:52 -11:00
committed by GitHub

View File

@@ -547,6 +547,11 @@ CBlockTemplate* CreateNewBlock(const CScript& _scriptPubKeyIn, int32_t gpucount,
if (scriptPubKeyIn.IsPayToScriptHash() || scriptPubKeyIn.IsPayToCryptoCondition()) if (scriptPubKeyIn.IsPayToScriptHash() || scriptPubKeyIn.IsPayToCryptoCondition())
{ {
fprintf(stderr,"CreateNewBlock: attempt to add timelock to pay2sh or pay2cc\n"); fprintf(stderr,"CreateNewBlock: attempt to add timelock to pay2sh or pay2cc\n");
if ( ASSETCHAINS_SYMBOL[0] == 0 || (ASSETCHAINS_SYMBOL[0] != 0 && !isStake) )
{
LEAVE_CRITICAL_SECTION(cs_main);
LEAVE_CRITICAL_SECTION(mempool.cs);
}
return 0; return 0;
} }
@@ -639,6 +644,11 @@ CBlockTemplate* CreateNewBlock(const CScript& _scriptPubKeyIn, int32_t gpucount,
else else
{ {
fprintf(stderr,"error adding notaryvin, need to create 0.0001 utxos\n"); fprintf(stderr,"error adding notaryvin, need to create 0.0001 utxos\n");
if ( ASSETCHAINS_SYMBOL[0] == 0 || (ASSETCHAINS_SYMBOL[0] != 0 && !isStake) )
{
LEAVE_CRITICAL_SECTION(cs_main);
LEAVE_CRITICAL_SECTION(mempool.cs);
}
return(0); return(0);
} }
} }