Open winsvega opened 4 years ago
void ClientTest::modifyTimestamp(int64_t _timestamp) { Block block(chainParams().accountStartNonce); DEV_READ_GUARDED(x_preSeal) block = m_preSeal; Transactions transactions; DEV_READ_GUARDED(x_postSeal) transactions = m_postSeal.pending(); block.resetCurrent(_timestamp); DEV_WRITE_GUARDED(x_preSeal) m_preSeal = block; auto& lastHashes = bc().lastBlockHashes(); assert(bc().currentHash() == block.info().parentHash()); for (auto const& t: transactions) block.execute(lastHashes, t); DEV_WRITE_GUARDED(x_working) m_working = block; DEV_READ_GUARDED(x_postSeal) m_postSeal = block; onPostStateChanged(); }
does someone remember why this line? assert(bc().currentHash() == block.info().parentHash());
assert(bc().currentHash() == block.info().parentHash());
when block is rewind and then modify timestamp is called. this line is triggered.
does someone remember why this line?
assert(bc().currentHash() == block.info().parentHash());
when block is rewind and then modify timestamp is called. this line is triggered.