Remove unnecessary const_cast

Signed-off-by: Julian Fleischer <julian@thirdhash.com>
This commit is contained in:
Julian Fleischer 2019-02-12 18:13:29 +01:00 committed by Julian Fleischer
parent ea022d9fd0
commit 5039e4b61b

View file

@ -4347,7 +4347,7 @@ bool CChainState::LoadGenesisBlock(const CChainParams& chainparams)
return true; return true;
try { try {
CBlock &block = const_cast<CBlock&>(chainparams.GenesisBlock()); const CBlock& block = chainparams.GenesisBlock();
CDiskBlockPos blockPos = SaveBlockToDisk(block, 0, chainparams, nullptr); CDiskBlockPos blockPos = SaveBlockToDisk(block, 0, chainparams, nullptr);
if (blockPos.IsNull()) if (blockPos.IsNull())
return error("%s: writing genesis block to disk failed", __func__); return error("%s: writing genesis block to disk failed", __func__);