message: Add -emergencystaking and -nocontractstaking options
diff: @@ -520,7 +520,10 @@ bool BlockAssembler::CheckBlockBeyondFull()
  }
  bool BlockAssembler::AttemptToAddContractToBlock(CTxMemPool::txiter iter, uint64_t minGasPrice) {
  - if(nTimeLimit != 0 && GetAdjustedTime() >= nTimeLimit-BYTECODE_TIME_BUFFER)
  + if (nTimeLimit != 0 && GetAdjustedTime() >= nTimeLimit - BYTECODE_TIME_BUFFER) {
  + return false;
  + }
  + if (GetBoolArg("-nocontractstaking", false))
  {
  return false;
  }
  @@ -1055,7 +1058,7 @@ void ThreadStakeMiner(CWallet *pwallet)
  MilliSleep(10000);
  }
  //don't disable PoS mining for no connections if in regtest mode
  - if(!regtestMode) {
  + if(!regtestMode && !GetBoolArg("-emergencystaking", false)) {
  while (g_connman->GetNodeCount(CConnman::CONNECTIONS_ALL) == 0 || IsInitialBlockDownload()) {
  nLastCoinStakeSearchInterval = 0;
  fTryToSync = true;
  