mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Merge 92fee79dab into merged_master (Bitcoin PR #19806)
Looks like James hardcoded a couple hashes in hard-to-find places, which caused a unit test to fail. I just changed the hash (which covers UTXO data which naturally will be different for us on account of our differently formatted CTxOuts). TODO: determine how Assumeutxo interacts with the fact that we don't save out nonces in our normal UTXO serialization. Probably we will need to remove the nonce from the CCoinStats serialization to avoid having inconsistent hashes across nodes, since these hashes are now checked in assumeutxo?
This commit is contained in:
commit
61a241c5ca
17 changed files with 715 additions and 30 deletions
14
src/txdb.cpp
14
src/txdb.cpp
|
|
@ -55,11 +55,15 @@ CCoinsViewDB::CCoinsViewDB(fs::path ldb_path, size_t nCacheSize, bool fMemory, b
|
|||
|
||||
void CCoinsViewDB::ResizeCache(size_t new_cache_size)
|
||||
{
|
||||
// Have to do a reset first to get the original `m_db` state to release its
|
||||
// filesystem lock.
|
||||
m_db.reset();
|
||||
m_db = MakeUnique<CDBWrapper>(
|
||||
m_ldb_path, new_cache_size, m_is_memory, /*fWipe*/ false, /*obfuscate*/ true);
|
||||
// We can't do this operation with an in-memory DB since we'll lose all the coins upon
|
||||
// reset.
|
||||
if (!m_is_memory) {
|
||||
// Have to do a reset first to get the original `m_db` state to release its
|
||||
// filesystem lock.
|
||||
m_db.reset();
|
||||
m_db = MakeUnique<CDBWrapper>(
|
||||
m_ldb_path, new_cache_size, m_is_memory, /*fWipe*/ false, /*obfuscate*/ true);
|
||||
}
|
||||
}
|
||||
|
||||
bool CCoinsViewDB::GetCoin(const COutPoint &outpoint, Coin &coin) const {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue