diff --git a/libethereum/BlockChain.cpp b/libethereum/BlockChain.cpp index 9921342d7..8fda03a88 100644 --- a/libethereum/BlockChain.cpp +++ b/libethereum/BlockChain.cpp @@ -1272,7 +1272,7 @@ bytes BlockChain::headerData(h256 const& _hash) const return BlockInfo::extractHeader(&m_blocks[_hash]).data().toBytes(); } -Block BlockChain::genesisBlock(OverlayDB const& _db) +Block BlockChain::genesisBlock(OverlayDB const& _db) const { Block ret(_db, BaseState::Empty); dev::eth::commit(m_genesisState, ret.mutableState().m_state); // bit horrible. maybe consider a better way of constructing it? diff --git a/libethereum/BlockChain.h b/libethereum/BlockChain.h index f8094fe23..581c0eee8 100644 --- a/libethereum/BlockChain.h +++ b/libethereum/BlockChain.h @@ -286,7 +286,7 @@ public: template void setOnBad(T const& _t) { m_onBad = _t; } /// Get a pre-made genesis State object. - Block genesisBlock(OverlayDB const& _db); + Block genesisBlock(OverlayDB const& _db) const; /// Verify block and prepare it for enactment virtual VerifiedBlockRef verifyBlock(bytesConstRef _block, std::function const& _onBad, ImportRequirements::value _ir = ImportRequirements::OutOfOrderChecks) const = 0;