message: coinstake can be orphaned
diff: @@ -4105,6 +4105,7 @@ int CWalletTx::GetBlocksToMaturity() const
  if (!(IsCoinBase() || IsCoinStake()))
  return 0;
  int chain_depth = GetDepthInMainChain();
  + if (!IsCoinStake())
  assert(chain_depth >= 0); // coinbase tx should not be conflicted
  return std::max(0, (Params().GetConsensus().nCoinbaseMaturity+1) - chain_depth);
  }
  