#345 double-free-or-corruption
This commit is contained in:
parent
6eccec2ba4
commit
13c782ccd6
2 changed files with 5 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/program_options.hpp>
|
||||
|
|
@ -60,6 +61,7 @@ protected:
|
|||
std::map<std::string, std::string> private_keys;
|
||||
|
||||
std::vector<std::string> son_listener_log;
|
||||
std::mutex son_listener_log_mutex;
|
||||
|
||||
void on_applied_block(const signed_block &b);
|
||||
|
||||
|
|
|
|||
|
|
@ -619,13 +619,15 @@ void sidechain_net_handler::settle_sidechain_transactions() {
|
|||
}
|
||||
|
||||
void sidechain_net_handler::add_to_son_listener_log(std::string trx_id) {
|
||||
const std::lock_guard<std::mutex> lock(son_listener_log_mutex);
|
||||
son_listener_log.insert(son_listener_log.begin(), trx_id);
|
||||
if (son_listener_log.size() > 33) {
|
||||
son_listener_log.erase(son_listener_log.end());
|
||||
son_listener_log.pop_back();
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> sidechain_net_handler::get_son_listener_log() {
|
||||
const std::lock_guard<std::mutex> lock(son_listener_log_mutex);
|
||||
return son_listener_log;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue