Skip to content

Commit af1bf37

Browse files
committed
wallet::CreateCoinStake set missing pindeFrom in stakeInput.
Before was loaded in GetIndexFrom and such functionality was removed.
1 parent f935801 commit af1bf37

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/wallet/wallet.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2757,6 +2757,7 @@ bool CWallet::CreateCoinStake(
27572757
for (const auto& out : *availableCoins) {
27582758
CPivStake stakeInput;
27592759
stakeInput.SetPrevout(out.tx->vout[out.i], COutPoint(out.tx->GetHash(), out.i));
2760+
stakeInput.SetIndexFrom(out.pindex);
27602761

27612762
//new block came in, move on
27622763
if (WITH_LOCK(cs_main, return chainActive.Height()) != pindexPrev->nHeight) return false;
@@ -4043,7 +4044,7 @@ void CMerkleTx::SetMerkleBranch(const CBlockIndex* pindex, int posInBlock)
40434044

40444045
int CMerkleTx::GetDepthInMainChain(bool enableIX) const
40454046
{
4046-
const CBlockIndex* pindexRet;
4047+
const CBlockIndex* pindexRet = nullptr;
40474048
return GetDepthInMainChain(pindexRet, enableIX);
40484049
}
40494050

0 commit comments

Comments
 (0)