Skip to content

Commit c6fe39c

Browse files
Chen-Yifanjhunsaker
authored andcommitted
db: fix in-memory implementation to support get_latest_verified_version()
1 parent 16aaabe commit c6fe39c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

category/mpt/db.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,8 +1255,8 @@ uint64_t Db::get_latest_finalized_version() const
12551255
uint64_t Db::get_latest_verified_version() const
12561256
{
12571257
MONAD_ASSERT(impl_);
1258-
MONAD_ASSERT(is_on_disk());
1259-
return impl_->aux().get_latest_verified_version();
1258+
return is_on_disk() ? impl_->aux().get_latest_verified_version()
1259+
: INVALID_BLOCK_NUM;
12601260
}
12611261

12621262
bytes32_t Db::get_latest_voted_block_id() const

0 commit comments

Comments
 (0)