Remove unused transaction objects from json_handler.cpp

This commit is contained in:
Thiago Silva 2023-04-19 12:56:19 -03:00
commit f5ec339a10
No known key found for this signature in database
GPG key ID: 034303EB8F453169

View file

@ -4114,7 +4114,6 @@ void nano::json_handler::unchecked ()
if (!ec)
{
boost::property_tree::ptree unchecked;
auto transaction (node.store.tx_begin_read ());
node.unchecked.for_each (
[&unchecked, &json_block_l] (nano::unchecked_key const & key, nano::unchecked_info const & info) {
if (json_block_l)
@ -4137,7 +4136,6 @@ void nano::json_handler::unchecked ()
void nano::json_handler::unchecked_clear ()
{
node.workers.push_task (create_worker_task ([] (std::shared_ptr<nano::json_handler> const & rpc_l) {
auto transaction (rpc_l->node.store.tx_begin_write ({ tables::unchecked }));
rpc_l->node.unchecked.clear ();
rpc_l->response_l.put ("success", "");
rpc_l->response_errors ();
@ -4195,7 +4193,6 @@ void nano::json_handler::unchecked_keys ()
if (!ec)
{
boost::property_tree::ptree unchecked;
auto transaction (node.store.tx_begin_read ());
node.unchecked.for_each (
key,
[&unchecked, json_block_l] (nano::unchecked_key const & key, nano::unchecked_info const & info) {