diff options
| author | SChernykh <15806605+SChernykh@users.noreply.github.com> | 2026-06-04 07:37:53 +0200 |
|---|---|---|
| committer | SChernykh <15806605+SChernykh@users.noreply.github.com> | 2026-06-04 07:40:07 +0200 |
| commit | 3d856f4825283e66a7ebbe9ac32e3f864bc906e2 (patch) | |
| tree | 1c9a5b700f5fc31c47ee843b34ccf97eaf595ec2 /src/p2p/net_node.cpp | |
| parent | 29bf6a5825350850037a9504f4b0c45b34b1eb75 (diff) | |
| download | monzero-core-3d856f4825283e66a7ebbe9ac32e3f864bc906e2.tar.gz monzero-core-3d856f4825283e66a7ebbe9ac32e3f864bc906e2.tar.xz monzero-core-3d856f4825283e66a7ebbe9ac32e3f864bc906e2.zip | |
Blockchain: fix wrong block_weight in handle_get_objects
- When there are missing IDs, blocks.size() != arg.blocks.size(), so arg.blocks can't be indexed by `i` - the indices will be wrong, the wrong weight will be returned to some peer and this peer will ban our node.
Use `bl.second` instead of `arg.blocks[i]`. Also it saves one DB query per returned block.
Diffstat (limited to 'src/p2p/net_node.cpp')
0 files changed, 0 insertions, 0 deletions
