diff --git a/libethereum/State.cpp b/libethereum/State.cpp index c6a6ce125..e0705859f 100644 --- a/libethereum/State.cpp +++ b/libethereum/State.cpp @@ -1006,9 +1006,9 @@ LastHashes State::getLastHashes(BlockChain const& _bc) const ret.resize(256); if (c_protocolVersion > 49) { - unsigned n = (unsigned)m_previousBlock.number; - for (unsigned i = 0; i < 256; ++i) - ret[i] = _bc.numberHash(std::max(n, i) - i); + ret[0] = _bc.currentHash(); + for (unsigned i = 1; i < 256; ++i) + ret[i] = ret[i - 1] ? _bc.details(ret[i - 1]).parent : h256(); } return ret; }