Exemplo n.º 1
0
        public int GetHashCode(ITransactionSourceKey obj)
        {
            if (obj is UtxoConfidentialSourceKey utxoConfidentialSourceKey)
            {
                return(utxoConfidentialSourceKey.KeyImage.GetHashCode());
            }

            return(0);
        }
Exemplo n.º 2
0
        public bool Equals(ITransactionSourceKey other)
        {
            if (other is UtxoConfidentialSourceKey utxoConfidentialSourceKey)
            {
                return(KeyImage.Equals(utxoConfidentialSourceKey.KeyImage));
            }

            return(false);
        }
Exemplo n.º 3
0
        public int GetHashCode(ITransactionSourceKey obj)
        {
            if (obj is AccountSourceKey accountSourceKey)
            {
                return(accountSourceKey.Signer.GetHashCode() ^ accountSourceKey.Height.GetHashCode());
            }

            return(0);
        }
Exemplo n.º 4
0
        public bool Equals(ITransactionSourceKey other)
        {
            if (other is AccountSourceKey accountSourceKey)
            {
                return(Signer.Equals(accountSourceKey.Signer) && Height == accountSourceKey.Height);
            }

            return(false);
        }
Exemplo n.º 5
0
        public bool Equals(ITransactionSourceKey x, ITransactionSourceKey y)
        {
            if (x == null && y == null)
            {
                return(true);
            }

            if (x is UtxoConfidentialSourceKey utxoConfidentialSourceKey1 && y is UtxoConfidentialSourceKey utxoConfidentialSourceKey2)
            {
                return(utxoConfidentialSourceKey1.KeyImage.Equals(utxoConfidentialSourceKey2.KeyImage));
            }

            return(false);
        }
Exemplo n.º 6
0
        public bool Equals(ITransactionSourceKey x, ITransactionSourceKey y)
        {
            if (x == null && y == null)
            {
                return(true);
            }

            if (x is AccountSourceKey accountSourceKey1 && y is AccountSourceKey accountSourceKey2)
            {
                return(accountSourceKey1.Signer.Equals(accountSourceKey2.Signer) && accountSourceKey1.Height == accountSourceKey2.Height);
            }

            return(false);
        }