Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/txdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,9 @@ class CCoinsViewDBCursor: public CCoinsViewCursor

std::unique_ptr<CCoinsViewCursor> CCoinsViewDB::Cursor() const
{
uint256 hashBestChain = GetBestBlock();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could be const

auto i = std::make_unique<CCoinsViewDBCursor>(
const_cast<CDBWrapper&>(*m_db).NewIterator(), GetBestBlock());
const_cast<CDBWrapper&>(*m_db).NewIterator(), hashBestChain);
/* It seems that there are no "const iterators" for LevelDB. Since we
only need read operations on it, use a const-cast to get around
that restriction. */
Expand Down