diff options
| author | tobtoht <tob@featherwallet.org> | 2026-06-09 17:54:27 +0000 |
|---|---|---|
| committer | tobtoht <tob@featherwallet.org> | 2026-06-09 17:54:27 +0000 |
| commit | c6e5759f31a3d37be86f1da762401cc9d1ba7c7f (patch) | |
| tree | 9e544c85d3921234189769097c3a8a2b22b1c494 /src | |
| parent | 4fd6c64209af750554318deeb950490ac2083154 (diff) | |
| parent | 3d856f4825283e66a7ebbe9ac32e3f864bc906e2 (diff) | |
| download | monzero-core-c6e5759f31a3d37be86f1da762401cc9d1ba7c7f.tar.gz monzero-core-c6e5759f31a3d37be86f1da762401cc9d1ba7c7f.tar.xz monzero-core-c6e5759f31a3d37be86f1da762401cc9d1ba7c7f.zip | |
Merge pull request #10715
3d856f4 Blockchain: fix wrong block_weight in handle_get_objects (SChernykh)
Diffstat (limited to 'src')
| -rw-r--r-- | src/cryptonote_core/blockchain.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 97fb8b8e3..f20bd1e26 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -2214,9 +2214,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; |
