90 if (batch_size == 0) {
99 if (t.cbegin() == t.cend()) {
105 auto latest_block_info_itr = --t.cend();
107 if (latest_block_info_itr->version != 0) {
114 uint32_t latest_block_batch_end_height = latest_block_info_itr->block_height;
116 if (latest_block_batch_end_height < batch_start_height_offset) {
124 uint32_t latest_block_batch_start_height =
125 latest_block_batch_end_height - ((latest_block_batch_end_height - batch_start_height_offset) % batch_size);
129 if (latest_block_batch_start_height == latest_block_batch_end_height) {
134 .batch_start_height = latest_block_batch_start_height,
135 .batch_start_timestamp = latest_block_info_itr->block_timestamp,
136 .batch_current_end_height = latest_block_batch_end_height,
137 .batch_current_end_timestamp = latest_block_info_itr->block_timestamp,
144 auto start_block_info_itr = t.find(latest_block_batch_start_height);
145 if (start_block_info_itr == t.cend() || start_block_info_itr->block_height != latest_block_batch_start_height) {
157 if (start_block_info_itr->version != 0) {
167 .batch_start_height = latest_block_batch_start_height,
168 .batch_start_timestamp = start_block_info_itr->block_timestamp,
169 .batch_current_end_height = latest_block_batch_end_height,
170 .batch_current_end_timestamp = latest_block_info_itr->block_timestamp,