Ledger maintenance refactor. (#130)

* Added ledger namespace.
* Thread-safe lcl access and update.
* Refactored history sync and serving into a thread.
* Restructured ledger cache item.
This commit is contained in:
Ravin Perera
2020-10-08 22:25:47 +05:30
committed by GitHub
parent 31048f55b8
commit cb4d0c4f59
30 changed files with 945 additions and 754 deletions

View File

@@ -8,6 +8,7 @@
#include "../conf.hpp"
#include "../crypto.hpp"
#include "../hplog.hpp"
#include "../ledger.hpp"
#include "usr.hpp"
#include "user_session_handler.hpp"
#include "user_input.hpp"
@@ -180,7 +181,7 @@ namespace usr
else if (msg_type == msg::usrmsg::MSGTYPE_STAT)
{
std::vector<uint8_t> msg;
parser.create_status_response(msg);
parser.create_status_response(msg, ledger::ctx.get_seq_no(), ledger::ctx.get_lcl());
user.session.send(msg);
return 0;
}