Skip to content

Commit

Permalink
Make rawdb::read_body work for eosevm
Browse files Browse the repository at this point in the history
  • Loading branch information
elmato committed Jul 6, 2023
1 parent 9ce3bb6 commit 6d2d780
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions silkworm/silkrpc/core/rawdb/chain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,10 @@ boost::asio::awaitable<silkworm::BlockBody> read_body(const DatabaseReader& read
if (stored_body.txn_count == 0) {
co_return BlockBody{{}, std::move(stored_body.ommers), std::move(stored_body.withdrawals)};
}
// 1 system txn at the beginning of block and 1 at the end
SILK_DEBUG << "base_txn_id: " << stored_body.base_txn_id + 1 << " txn_count: " << stored_body.txn_count - 2;
auto transactions = co_await read_canonical_transactions(reader, stored_body.base_txn_id + 1, stored_body.txn_count - 2);
// original comment: 1 system txn at the beginning of block and 1 at the end
SILK_DEBUG << "base_txn_id: " << stored_body.base_txn_id << " txn_count: " << stored_body.txn_count;
// auto transactions = co_await read_canonical_transactions(reader, stored_body.base_txn_id + 1, stored_body.txn_count - 2);
auto transactions = co_await read_canonical_transactions(reader, stored_body.base_txn_id, stored_body.txn_count);
if (!transactions.empty()) {
const auto senders = co_await read_senders(reader, block_hash, block_number);
if (senders.size() == transactions.size()) {
Expand Down

0 comments on commit 6d2d780

Please sign in to comment.