message: Add header check before sign
diff: @@ -3418,7 +3418,9 @@ bool SignBlock(std::shared_ptr<CBlock> pblock, CWallet& wallet, const CAmount& n
  pblock->prevoutStake = pblock->vtx[1]->vin[0].prevout;
  // append a signature to our block and ensure that is LowS
  - return key.Sign(pblock->GetHashWithoutSign(), pblock->vchBlockSig) && EnsureLowS(pblock->vchBlockSig);
  + return key.Sign(pblock->GetHashWithoutSign(), pblock->vchBlockSig) &&
  + EnsureLowS(pblock->vchBlockSig) &&
  + CheckHeaderPoS(*pblock, Params().GetConsensus());
  }
  }
  nLastCoinStakeSearchInterval = nSearchTime - nLastCoinStakeSearchTime;
  