message: [Refactor] Remove some more chainActive accesses and cs_main locks
diff: @@ -393,12 +393,7 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
  if (pfrom->nVersion < ActiveProtocol()) return;
  - int nHeight;
  - {
  - TRY_LOCK(cs_main, locked);
  - if (!locked || chainActive.Tip() == NULL) return;
  - nHeight = chainActive.Tip()->nHeight;
  - }
  + int nHeight = mnodeman.GetBestHeight();
  if (masternodePayments.mapMasternodePayeeVotes.count(winner.GetHash())) {
  LogPrint(BCLog::MASTERNODE, "mnw - Already seen - %s bestHeight %d\n", winner.GetHash().ToString().c_str(), nHeight);
  @@ -467,12 +462,7 @@ bool CMasternodePayments::IsScheduled(CMasternode& mn, int nNotBlockHeight)
  {
  LOCK(cs_mapMasternodeBlocks);
  - int nHeight;
  - {
  - TRY_LOCK(cs_main, locked);
  - if (!locked || chainActive.Tip() == NULL) return false;
  - nHeight = chainActive.Tip()->nHeight;
  - }
  + int nHeight = mnodeman.GetBestHeight();
  CScript mnpayee;
  mnpayee = GetScriptForDestination(mn.pubKeyCollateralAddress.GetID());
  @@ -609,12 +599,7 @@ void CMasternodePayments::CleanPaymentList()
  {
  LOCK2(cs_mapMasternodePayeeVotes, cs_mapMasternodeBlocks);
  - int nHeight;
  - {
  - TRY_LOCK(cs_main, locked);
  - if (!locked || chainActive.Tip() == NULL) return;
  - nHeight = chainActive.Tip()->nHeight;
  - }
  + int nHeight = mnodeman.GetBestHeight();
  //keep up to five cycles for historical sake
  int nLimit = std::max(int(mnodeman.size() * 1.25), 1000);
  @@ -712,12 +697,7 @@ void CMasternodePayments::Sync(CNode* node, int nCountNeeded)
  {
  LOCK(cs_mapMasternodePayeeVotes);
  - int nHeight;
  - {
  - TRY_LOCK(cs_main, locked);
  - if (!locked || chainActive.Tip() == NULL) return;
  - nHeight = chainActive.Tip()->nHeight;
  - }
  + int nHeight = mnodeman.GetBestHeight();
  int nCount = (mnodeman.CountEnabled() * 1.25);
  if (nCountNeeded > nCount) nCountNeeded = nCount;
  