Skip to content

Commit

Permalink
Fix compilation errors in support/lockedpool.cpp
Browse files Browse the repository at this point in the history
Changes in bitcoin#12048 cause a compilation error in Arena::walk() when
ARENA_DEBUG is defined. Specifically, Arena's chunks_free map was
changed to have a different value type.

Additionally, missing includes cause other compilation errors when
ARENA_DEBUG is defined.

Reproduced with:

make CPPFLAGS=-DARENA_DEBUG
  • Loading branch information
jkczyz authored and furszy committed Aug 4, 2021
1 parent d19359f commit cae2e13
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/support/lockedpool.cpp
Expand Up @@ -27,6 +27,10 @@
#endif

#include <algorithm>
#ifdef ARENA_DEBUG
#include <iomanip>
#include <iostream>
#endif

LockedPoolManager* LockedPoolManager::_instance = nullptr;
std::once_flag LockedPoolManager::init_flag;
Expand Down Expand Up @@ -153,7 +157,7 @@ void Arena::walk() const
printchunk(chunk.first, chunk.second, true);
std::cout << std::endl;
for (const auto& chunk: chunks_free)
printchunk(chunk.first, chunk.second, false);
printchunk(chunk.first, chunk.second->first, false);
std::cout << std::endl;
}
#endif
Expand Down

0 comments on commit cae2e13

Please sign in to comment.