Skip to content

Commit

Permalink
node: fix reading zero transactions from snapshot (#1375)
Browse files Browse the repository at this point in the history
  • Loading branch information
canepat committed Jul 26, 2023
1 parent b945f79 commit 9d213a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion silkworm/node/db/access_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@ bool DataModel::is_body_in_snapshot(BlockNum height) {
}

bool DataModel::read_transactions_from_snapshot(BlockNum height, uint64_t base_txn_id, uint64_t txn_count,
bool read_senders, std::vector<Transaction> txs) {
bool read_senders, std::vector<Transaction>& txs) {
txs.reserve(txn_count);
if (txn_count == 0) {
return true;
Expand Down
2 changes: 1 addition & 1 deletion silkworm/node/db/access_layer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ class DataModel {
static bool is_body_in_snapshot(BlockNum height);
static bool read_rlp_transactions_from_snapshot(BlockNum height, std::vector<Bytes>& rlp_txs);
static bool read_transactions_from_snapshot(BlockNum height, uint64_t base_txn_id, uint64_t txn_count,
bool read_senders, std::vector<Transaction> txs);
bool read_senders, std::vector<Transaction>& txs);

static inline snapshot::SnapshotRepository* repository_{nullptr};

Expand Down

0 comments on commit 9d213a1

Please sign in to comment.