Merge pull request #10714

6f7ad2c Blockchain: fix wrong block_weight in handle_get_objects (SChernykh)
This commit is contained in:
tobtoht
2026-06-09 17:53:48 +00:00
+1 -3
View File
@@ -2269,9 +2269,7 @@ bool Blockchain::handle_get_objects(NOTIFY_REQUEST_GET_OBJECTS::request& arg, NO
//pack block
e.block = std::move(bl.first);
e.block_weight = 0;
if (arg.prune && m_db->block_exists(arg.blocks[i]))
e.block_weight = m_db->get_block_weight(m_db->get_block_height(arg.blocks[i]));
e.block_weight = arg.prune ? m_db->get_block_weight(get_block_height(bl.second)) : 0;
}
return true;