Let's have a discussion and see if a structure change is warranted to many places std::maps/unsorted_maps are used in the code.
Now that we support c++17 as a minimum as of #20413 we should consider using try_emplace to gain efficiency when objects are not added, it also leads to more expressive and safer code(prevents stealing from arguments during failed insertion). For example, it seems FetchCoin uses emplace but does a piecewise_construct however it can be replaced with try_emplace:
CCoinsMap::iterator ret = cacheCoins.emplace(std::piecewise_construct, std::forward_as_tuple(outpoint), std::forward_as_tuple(std::move(tmp))).first;
becomes
CCoinsMap::iterator ret = cacheCoins.try_emplace(outpoint, std::move(tmp)).first;
I also noticed emplace was used on dir_locks which is a map to unique_ptrs which is generally discouraged. It is used here and should likely just look like this:
dir_locks[pathLockFile.string()] = std::move(lock));