Exemple #1
0
 public void MergeFrom(ConsensusCommand other)
 {
     if (other == null)
     {
         return;
     }
     if (other.LimitMillisecondsOfMiningBlock != 0)
     {
         LimitMillisecondsOfMiningBlock = other.LimitMillisecondsOfMiningBlock;
     }
     if (other.Hint.Length != 0)
     {
         Hint = other.Hint;
     }
     if (other.arrangedMiningTime_ != null)
     {
         if (arrangedMiningTime_ == null)
         {
             ArrangedMiningTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         ArrangedMiningTime.MergeFrom(other.ArrangedMiningTime);
     }
     if (other.miningDueTime_ != null)
     {
         if (miningDueTime_ == null)
         {
             MiningDueTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         MiningDueTime.MergeFrom(other.MiningDueTime);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Exemple #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (LimitMillisecondsOfMiningBlock != 0)
            {
                hash ^= LimitMillisecondsOfMiningBlock.GetHashCode();
            }
            if (Hint.Length != 0)
            {
                hash ^= Hint.GetHashCode();
            }
            if (arrangedMiningTime_ != null)
            {
                hash ^= ArrangedMiningTime.GetHashCode();
            }
            if (miningDueTime_ != null)
            {
                hash ^= MiningDueTime.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }