message: Replace TestBlockValidity assert with an error.
diff: @@ -4866,7 +4866,8 @@ bool ProcessNewBlock(const CChainParams& chainparams, const std::shared_ptr<cons
  bool TestBlockValidity(CValidationState& state, const CChainParams& chainparams, const CBlock& block, CBlockIndex* pindexPrev, bool fCheckPOW, bool fCheckMerkleRoot)
  {
  AssertLockHeld(cs_main);
  - assert(pindexPrev && pindexPrev == chainActive.Tip());
  + if (!pindexPrev || pindexPrev != chainActive.Tip())
  + return error("%s: new block added to chain before staked block was fully packaged.", __func__);
  CCoinsViewCache viewNew(pcoinsTip.get());
  uint256 block_hash(block.GetHash());
  CBlockIndex indexDummy(block);
  