Fix ASAN warning in wallet.history (again) (#1933)

This commit is contained in:
Wesley Shillingford 2019-04-26 10:46:34 +01:00 committed by GitHub
commit db7644f905
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1861,7 +1861,7 @@ namespace
class history_visitor : public nano::block_visitor
{
public:
history_visitor (nano::json_handler & handler_a, bool raw_a, nano::transaction & transaction_a, boost::property_tree::ptree & tree_a, nano::block_hash const & hash_a, std::vector<nano::public_key> const & accounts_filter_a = {}) :
history_visitor (nano::json_handler & handler_a, bool raw_a, nano::transaction & transaction_a, boost::property_tree::ptree & tree_a, nano::block_hash const & hash_a, std::vector<nano::public_key> const & accounts_filter_a) :
handler (handler_a),
raw (raw_a),
transaction (transaction_a),
@ -3951,7 +3951,8 @@ void nano::json_handler::wallet_history ()
if (block != nullptr && timestamp >= modified_since)
{
boost::property_tree::ptree entry;
history_visitor visitor (*this, false, block_transaction, entry, hash);
std::vector<nano::public_key> no_filter;
history_visitor visitor (*this, false, block_transaction, entry, hash, no_filter);
block->visit (visitor);
if (!entry.empty ())
{