ported Bitcoin PR 7229 to resolve Issue #16
This commit is contained in:
@@ -221,7 +221,7 @@ class WalletTest (BitcoinTestFramework):
|
|||||||
for uTx in unspentTxs:
|
for uTx in unspentTxs:
|
||||||
if uTx['txid'] == zeroValueTxid:
|
if uTx['txid'] == zeroValueTxid:
|
||||||
found = True
|
found = True
|
||||||
assert_equal(uTx['amount'], Decimal('0.00000000'))
|
assert_equal(uTx['amount'], Decimal('0'))
|
||||||
assert(found)
|
assert(found)
|
||||||
|
|
||||||
#do some -walletbroadcast tests
|
#do some -walletbroadcast tests
|
||||||
|
|||||||
@@ -1233,8 +1233,13 @@ bool CWalletDB::Recover(CDBEnv& dbenv, const std::string& filename, bool fOnlyKe
|
|||||||
CDataStream ssKey(row.first, SER_DISK, CLIENT_VERSION);
|
CDataStream ssKey(row.first, SER_DISK, CLIENT_VERSION);
|
||||||
CDataStream ssValue(row.second, SER_DISK, CLIENT_VERSION);
|
CDataStream ssValue(row.second, SER_DISK, CLIENT_VERSION);
|
||||||
string strType, strErr;
|
string strType, strErr;
|
||||||
bool fReadOK = ReadKeyValue(&dummyWallet, ssKey, ssValue,
|
bool fReadOK;
|
||||||
|
{
|
||||||
|
// Required in LoadKeyMetadata():
|
||||||
|
LOCK(dummyWallet.cs_wallet);
|
||||||
|
fReadOK = ReadKeyValue(&dummyWallet, ssKey, ssValue,
|
||||||
wss, strType, strErr);
|
wss, strType, strErr);
|
||||||
|
}
|
||||||
if (!IsKeyType(strType))
|
if (!IsKeyType(strType))
|
||||||
continue;
|
continue;
|
||||||
if (!fReadOK)
|
if (!fReadOK)
|
||||||
|
|||||||
Reference in New Issue
Block a user