Use fully static linkage #364

Closed
bvbfan wants to merge 78 commits from static_link into master
Showing only changes of commit 3b5fae6cfb - Show all commits

View file

@ -5,8 +5,10 @@
#include <trie.h> #include <trie.h>
#include <algorithm> #include <algorithm>
#include <chrono>
#include <memory> #include <memory>
#include <iomanip> #include <iomanip>
#include <thread>
#include <tuple> #include <tuple>
#include <boost/container/flat_map.hpp> #include <boost/container/flat_map.hpp>
@ -466,20 +468,23 @@ bool CClaimTrieCacheBase::flush()
{ {
if (transacting) { if (transacting) {
getMerkleHash(); getMerkleHash();
RETRY_COMMIT: do {
try { try {
db << "commit"; db << "commit";
} } catch (const sqlite::sqlite_exception& e) {
catch (const sqlite::sqlite_exception& e) { auto code = e.get_code();
logPrint << "ERROR in ClaimTrieCache flush: " << e.what() << Clog::endl; if (code == SQLITE_LOCKED || code == SQLITE_BUSY) {
auto code = e.get_code(); logPrint << "Retrying the commit in one second." << Clog::endl;
if (code == SQLITE_LOCKED || code == SQLITE_BUSY) { using namespace std::chrono_literals;
LogPrintf("Retrying the commit in one second.\n", e.what()); std::this_thread::sleep_for(1s);
MilliSleep(1000); continue;
goto RETRY_COMMIT; } else {
logPrint << "ERROR in ClaimTrieCache::" << __func__ << "(): " << e.what() << Clog::endl;
return false;
}
} }
return false; break;
} } while (true);
transacting = false; transacting = false;
} }
base->nNextHeight = nNextHeight; base->nNextHeight = nNextHeight;