Skip to content

Commit

Permalink
fix nTxOffset in stake generation
Browse files Browse the repository at this point in the history
  • Loading branch information
EvgenijM86 committed Jan 7, 2019
1 parent df3f8b2 commit 2aca1e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wallet/wallet.cpp
Expand Up @@ -4364,7 +4364,7 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int
// Search nSearchInterval seconds back up to nMaxStakeSearchInterval
uint256 hashProofOfStake = uint256();
COutPoint prevoutStake = pcoin.outpoint;
if (CheckStakeKernelHash(nBits, chainActive.Tip(), header, postx.nTxOffset + sizeof(CBlockHeader), tx, prevoutStake, txNew.nTime - n, hashProofOfStake))
if (CheckStakeKernelHash(nBits, chainActive.Tip(), header, postx.nTxOffset + CBlockHeader::NORMAL_SERIALIZE_SIZE, tx, prevoutStake, txNew.nTime - n, hashProofOfStake))
{
// Found a kernel
if (gArgs.GetBoolArg("-debug", false) && gArgs.GetBoolArg("-printcoinstake", false))
Expand Down

0 comments on commit 2aca1e2

Please sign in to comment.