File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -387,7 +387,7 @@ namespace
387387 mempool = std::make_shared<lws::mempool>();
388388 }
389389
390- auto client = scanner.sync (ctx.connect ().value (), prog.untrusted_daemon ).value ();
390+ auto client = scanner.sync (ctx.connect ().value (), prog.untrusted_daemon , prog. regtest ).value ();
391391
392392 lws::rest_server server{
393393 epee::to_span (prog.rest_servers ),
Original file line number Diff line number Diff line change @@ -305,6 +305,11 @@ namespace lws
305305
306306 void subaddress_reader::update_reader ()
307307 {
308+ // Release the current read txn before opening the next one - `reader = disk.start_read()`
309+ // would otherwise begin the new LMDB read txn (inside start_read()) while the old one
310+ // is still open on this thread, which LMDB's default (non-MDB_NOTLS) reader-slot tracking
311+ // does not support and reports as MDB_BAD_RSLOT.
312+ reader = expect<db::storage_reader>{common_error::kInvalidArgument };
308313 reader = disk.start_read ();
309314 if (!reader)
310315 MERROR (" Subadress lookup failure: " << reader.error ().message ());
Original file line number Diff line number Diff line change @@ -944,7 +944,7 @@ LWS_CASE("lws::scanner::sync and lws::scanner::run")
944944
945945 auto reader = MONERO_UNWRAP (db.start_read ());
946946 auto outputs = MONERO_UNWRAP (reader.get_outputs (lws::db::account_id (1 )));
947- EXPECT (outputs.count () == 6 );
947+ EXPECT (outputs.count () == 7 );
948948 auto output_it = outputs.make_iterator ();
949949 for (auto output_it = outputs.make_iterator (); !output_it.is_end (); ++output_it)
950950 {
@@ -1003,7 +1003,7 @@ LWS_CASE("lws::scanner::sync and lws::scanner::run")
10031003
10041004 {
10051005 const std::vector<lws::db::subaddress_dict> expected_range{
1006- {lws::db::major_index (0 ), {{lws::db::index_range{lws::db::minor_index (0 ), lws::db::minor_index (2 )}}}}
1006+ {lws::db::major_index (0 ), {{lws::db::index_range{lws::db::minor_index (0 ), lws::db::minor_index (3 )}}}}
10071007 };
10081008 EXPECT (MONERO_UNWRAP (reader.get_subaddresses (lws::db::account_id (1 ))) == expected_range);
10091009 }
You can’t perform that action at this time.
0 commit comments