Don't log mempool error for staking tx, fix default destination for staking tx

This commit is contained in:
miketout
2018-11-01 13:40:51 -07:00
parent 4ac64cd2a0
commit f1f6dfbb85
3 changed files with 14 additions and 12 deletions

View File

@@ -825,17 +825,20 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey, int32_t nHeight,
}
else
{
if (!reservekey.GetReservedKey(pubkey))
if (!isStake)
{
return NULL;
if (!reservekey.GetReservedKey(pubkey))
{
return NULL;
}
scriptPubKey.resize(35);
ptr = (uint8_t *)pubkey.begin();
scriptPubKey[0] = 33;
for (i=0; i<33; i++)
scriptPubKey[i+1] = ptr[i];
scriptPubKey[34] = OP_CHECKSIG;
//scriptPubKey = CScript() << ToByteVector(pubkey) << OP_CHECKSIG;
}
scriptPubKey.resize(35);
ptr = (uint8_t *)pubkey.begin();
scriptPubKey[0] = 33;
for (i=0; i<33; i++)
scriptPubKey[i+1] = ptr[i];
scriptPubKey[34] = OP_CHECKSIG;
//scriptPubKey = CScript() << ToByteVector(pubkey) << OP_CHECKSIG;
}
return CreateNewBlock(scriptPubKey, gpucount, isStake);
}