Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

Commit e95ef79

Browse files
committed
Fix db::Slice pointing to non-existent data
1 parent ee0c677 commit e95ef79

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libethereum/BlockChain.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ namespace fs = boost::filesystem;
5151

5252
namespace
5353
{
54-
db::Slice const c_sliceChainStart{"chainStart"};
54+
std::string const c_chainStart{"chainStart"};
55+
db::Slice const c_sliceChainStart{c_chainStart};
5556
}
5657

5758
#if defined(_WIN32)
@@ -1590,7 +1591,7 @@ VerifiedBlockRef BlockChain::verifyBlock(bytesConstRef _block, std::function<voi
15901591

15911592
void BlockChain::setChainStartBlockNumber(unsigned _number)
15921593
{
1593-
h256 const& hash = numberHash(_number);
1594+
h256 const hash = numberHash(_number);
15941595
if (!hash)
15951596
BOOST_THROW_EXCEPTION(UnknownBlockNumber());
15961597

0 commit comments

Comments
 (0)