public void CompareTrue() { PrepareHash(); var leftLeft = BigEndianConverter.ToUInt64(new Span <byte>(_hashBytes).Slice(0, 8)); var leftRight = BigEndianConverter.ToUInt64(new Span <byte>(_hashBytes).Slice(8, 8)); var rightLeft = BigEndianConverter.ToUInt64(new Span <byte>(_hashBytes).Slice(16, 8)); var rightRight = BigEndianConverter.ToUInt64(new Span <byte>(_hashBytes).Slice(24, 8)); Hash256 toCompare = new Hash256(leftLeft, leftRight, rightLeft, rightRight); Assert.Equal(0, _hash.CompareTo(toCompare)); }
public int CompareTo(BlockId other) { return(_hash.CompareTo(other._hash)); }