diff options
| author | tobtoht <tob@featherwallet.org> | 2025-03-10 16:20:00 +0000 |
|---|---|---|
| committer | tobtoht <tob@featherwallet.org> | 2025-03-10 16:20:00 +0000 |
| commit | 3da68db9789697d30dc309df2f1da5d348bc4ce2 (patch) | |
| tree | 68c98fab9146797007ab778cdb4a609e1e41f43c /src/blockchain_utilities/blockchain_import.cpp | |
| parent | 0232839913b13cf0ab0bb7ad25fff0c05f37d2fe (diff) | |
| parent | 008ba966da88f073f226b299533faca905ceabf8 (diff) | |
| download | monzero-core-3da68db9789697d30dc309df2f1da5d348bc4ce2.tar.gz monzero-core-3da68db9789697d30dc309df2f1da5d348bc4ce2.tar.xz monzero-core-3da68db9789697d30dc309df2f1da5d348bc4ce2.zip | |
Merge pull request #9740
008ba966d blockchain sync: reduce disk writes from 2 to 1 per tx (jeffro256)
Diffstat (limited to 'src/blockchain_utilities/blockchain_import.cpp')
| -rw-r--r-- | src/blockchain_utilities/blockchain_import.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/blockchain_utilities/blockchain_import.cpp b/src/blockchain_utilities/blockchain_import.cpp index f8cca638d..8a25e1da9 100644 --- a/src/blockchain_utilities/blockchain_import.cpp +++ b/src/blockchain_utilities/blockchain_import.cpp @@ -174,7 +174,9 @@ int check_flush(cryptonote::core &core, std::vector<block_complete_entry> &block for(auto& tx_blob: block_entry.txs) { tx_verification_context tvc = AUTO_VAL_INIT(tvc); - core.handle_incoming_tx(tx_blob, tvc, relay_method::block, true); + CHECK_AND_ASSERT_THROW_MES(tx_blob.prunable_hash == crypto::null_hash, + "block entry must not contain pruned txs"); + core.handle_incoming_tx(tx_blob.blob, tvc, relay_method::block, true); if(tvc.m_verifivation_failed) { cryptonote::transaction transaction; @@ -190,8 +192,9 @@ int check_flush(cryptonote::core &core, std::vector<block_complete_entry> &block // process block block_verification_context bvc = {}; + pool_supplement ps{}; - core.handle_incoming_block(block_entry.block, pblocks.empty() ? NULL : &pblocks[blockidx++], bvc, false); // <--- process block + core.handle_incoming_block(block_entry.block, pblocks.empty() ? NULL : &pblocks[blockidx++], bvc, ps, false); // <--- process block if(bvc.m_verifivation_failed) { |
