From 04ed2d1952708dd7bab357844e836057100889ff Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Thu, 20 Aug 2015 10:37:52 +0200 Subject: [PATCH] const-correctness for BlockChain::genesisBlock. --- libethereum/BlockChain.cpp | 2 +- libethereum/BlockChain.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;