diff --git a/indexer/src/lib.rs b/indexer/src/lib.rs index 87cb8c20f90a1188ce79c7c5fc0e0d9404fb0194..b7fa23aba79fbc4dd9071e7bf5f9275fb439573b 100644 --- a/indexer/src/lib.rs +++ b/indexer/src/lib.rs @@ -80,12 +80,13 @@ fn get_next_wot_id() -> WotId { next_wot_id_.add_assign(1); next_wot_id } else { - NEXT_WOT_ID = Some(if let Some(main_wot) = MAIN_WOT.get() { + let next_wot_id = if let Some(main_wot) = MAIN_WOT.get() { main_wot.read().size() } else { 0 - }); - 0 + }; + NEXT_WOT_ID = Some(next_wot_id + 1); + next_wot_id } }) }