|
|
@ -357,16 +357,13 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, |
|
|
|
{ |
|
|
|
{ |
|
|
|
uint256 hash; |
|
|
|
uint256 hash; |
|
|
|
ssKey >> hash; |
|
|
|
ssKey >> hash; |
|
|
|
CWalletTx& wtx = pwallet->mapWallet[hash]; |
|
|
|
CWalletTx wtx; |
|
|
|
ssValue >> wtx; |
|
|
|
ssValue >> wtx; |
|
|
|
CValidationState state; |
|
|
|
CValidationState state; |
|
|
|
if (CheckTransaction(wtx, state) && (wtx.GetHash() == hash) && state.IsValid()) |
|
|
|
if (CheckTransaction(wtx, state) && (wtx.GetHash() == hash) && state.IsValid()) |
|
|
|
wtx.BindWallet(pwallet); |
|
|
|
wtx.BindWallet(pwallet); |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
|
|
|
|
pwallet->mapWallet.erase(hash); |
|
|
|
|
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Undo serialize changes in 31600
|
|
|
|
// Undo serialize changes in 31600
|
|
|
|
if (31404 <= wtx.fTimeReceivedIsTxTime && wtx.fTimeReceivedIsTxTime <= 31703) |
|
|
|
if (31404 <= wtx.fTimeReceivedIsTxTime && wtx.fTimeReceivedIsTxTime <= 31703) |
|
|
@ -391,6 +388,7 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, |
|
|
|
if (wtx.nOrderPos == -1) |
|
|
|
if (wtx.nOrderPos == -1) |
|
|
|
wss.fAnyUnordered = true; |
|
|
|
wss.fAnyUnordered = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pwallet->mapWallet[hash] = wtx; |
|
|
|
//// debug print
|
|
|
|
//// debug print
|
|
|
|
//LogPrintf("LoadWallet %s\n", wtx.GetHash().ToString().c_str());
|
|
|
|
//LogPrintf("LoadWallet %s\n", wtx.GetHash().ToString().c_str());
|
|
|
|
//LogPrintf(" %12"PRId64" %s %s %s\n",
|
|
|
|
//LogPrintf(" %12"PRId64" %s %s %s\n",
|
|
|
|