Replace calls to GetHash() with GetTxid() for transaction objects.
Where the caller intends to receive a transaction id and not a double SHA256 hash.
This commit is contained in:
@@ -288,7 +288,7 @@ DBErrors CWalletDB::ReorderTransactions(CWallet* pwallet)
|
||||
|
||||
if (pwtx)
|
||||
{
|
||||
if (!WriteTx(pwtx->GetHash(), *pwtx))
|
||||
if (!WriteTx(pwtx->GetTxid(), *pwtx))
|
||||
return DB_LOAD_FAIL;
|
||||
}
|
||||
else
|
||||
@@ -312,7 +312,7 @@ DBErrors CWalletDB::ReorderTransactions(CWallet* pwallet)
|
||||
// Since we're changing the order, write it back
|
||||
if (pwtx)
|
||||
{
|
||||
if (!WriteTx(pwtx->GetHash(), *pwtx))
|
||||
if (!WriteTx(pwtx->GetTxid(), *pwtx))
|
||||
return DB_LOAD_FAIL;
|
||||
}
|
||||
else
|
||||
@@ -371,7 +371,7 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
|
||||
CWalletTx wtx;
|
||||
ssValue >> wtx;
|
||||
CValidationState state;
|
||||
if (!(CheckTransaction(wtx, state) && (wtx.GetHash() == hash) && state.IsValid()))
|
||||
if (!(CheckTransaction(wtx, state) && (wtx.GetTxid() == hash) && state.IsValid()))
|
||||
return false;
|
||||
|
||||
// Undo serialize changes in 31600
|
||||
|
||||
Reference in New Issue
Block a user