try fix
This commit is contained in:
@@ -41,6 +41,7 @@ using namespace std;
|
|||||||
|
|
||||||
static uint64_t nAccountingEntryNumber = 0;
|
static uint64_t nAccountingEntryNumber = 0;
|
||||||
static list<uint256> deadTxns;
|
static list<uint256> deadTxns;
|
||||||
|
extern CBlockIndex *komodo_blockindex(uint256 hash);
|
||||||
|
|
||||||
//
|
//
|
||||||
// CWalletDB
|
// CWalletDB
|
||||||
@@ -969,8 +970,8 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet)
|
|||||||
fprintf(stderr, "Removing possible orphaned staking transaction from wallet.%s\n", hash.ToString().c_str());
|
fprintf(stderr, "Removing possible orphaned staking transaction from wallet.%s\n", hash.ToString().c_str());
|
||||||
if (!EraseTx(hash))
|
if (!EraseTx(hash))
|
||||||
fprintf(stderr, "could not delete tx.%s\n",hash.ToString().c_str());
|
fprintf(stderr, "could not delete tx.%s\n",hash.ToString().c_str());
|
||||||
uint256 blockhash; CTransaction tx;
|
uint256 blockhash; CTransaction tx; CBlockIndex* pindex;
|
||||||
if ( GetTransaction(hash,tx,blockhash,false) && mapBlockIndex.find(blockhash) != mapBlockIndex.end() )
|
if ( GetTransaction(hash,tx,blockhash,false) && (pindex= komodo_blockindex(blockhash)) != 0 && chainActive.Contains(pindex) )
|
||||||
{
|
{
|
||||||
CWalletTx wtx(pwallet,tx);
|
CWalletTx wtx(pwallet,tx);
|
||||||
pwallet->AddToWallet(wtx, true, NULL);
|
pwallet->AddToWallet(wtx, true, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user