Exemplo n.º 1
0
        /// <summary>
        /// Compares this node ID to another node ID.
        /// </summary>
        /// <param name="other"></param>
        /// <returns></returns>
        public bool Equals(KNodeId160 other)
        {
            fixed(byte *lptr = data)
            {
                var l = new ReadOnlySpan <byte>(lptr, SIZE);
                var r = new ReadOnlySpan <byte>(other.data, SIZE);

                return(l.SequenceEqual(r));
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Compares this instance to the other instance.
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public int CompareTo(KNodeId160 other)
 {
     return(KNodeIdComparer <KNodeId160> .Default.Compare(this, other));
 }