Beispiel #1
0
        public TxOutputKey(UInt256 txHash, UInt32 txOutputIndex)
        {
            this._txHash        = txHash;
            this._txOutputIndex = txOutputIndex;

            this.hashCode = txHash.GetHashCode() ^ txOutputIndex.GetHashCode();
        }
Beispiel #2
0
        public BlockchainKey(Guid guid, UInt256 rootBlockHash)
        {
            this._guid          = guid;
            this._rootBlockHash = rootBlockHash;

            this.hashCode = guid.GetHashCode() ^ rootBlockHash.GetHashCode();
        }
Beispiel #3
0
        public BlockchainKey(Guid guid, UInt256 rootBlockHash)
        {
            this._guid = guid;
            this._rootBlockHash = rootBlockHash;

            this.hashCode = guid.GetHashCode() ^ rootBlockHash.GetHashCode();
        }
Beispiel #4
0
        public TxOutputKey(UInt256 txHash, UInt32 txOutputIndex)
        {
            TxHash = txHash;
            TxOutputIndex = txOutputIndex;

            this.hashCode = txHash.GetHashCode() ^ txOutputIndex.GetHashCode();
        }
Beispiel #5
0
        public TxKey(UInt256 blockHash, UInt32 txIndex, UInt256 txHash)
        {
            this._blockHash = blockHash;
            this._txIndex   = txIndex;
            this._txHash    = txHash;

            this.hashCode = blockHash.GetHashCode() ^ txIndex.GetHashCode() ^ txHash.GetHashCode();
        }
Beispiel #6
0
        public TxOutputKey(UInt256 txHash, UInt32 txOutputIndex)
        {
            this._txHash = txHash;
            this._txOutputIndex = txOutputIndex;

            this.notDefault = true;
            this.hashCode = txHash.GetHashCode() ^ txOutputIndex.GetHashCode();
        }
Beispiel #7
0
        public TxKey(UInt256 blockHash, UInt32 txIndex, UInt256 txHash)
        {
            this._blockHash = blockHash;
            this._txIndex = txIndex;
            this._txHash = txHash;

            this.hashCode = blockHash.GetHashCode() ^ txIndex.GetHashCode() ^ txHash.GetHashCode();
        }
Beispiel #8
0
        public ChainedBlock(UInt256 blockHash, UInt256 previousBlockHash, int height, BigInteger totalWork)
        {
            this._blockHash         = blockHash;
            this._previousBlockHash = previousBlockHash;
            this._height            = height;
            this._totalWork         = totalWork;

            this.hashCode = blockHash.GetHashCode() ^ previousBlockHash.GetHashCode() ^ height.GetHashCode() ^ totalWork.GetHashCode();
        }
Beispiel #9
0
        public UnspentTx(UInt256 blockHash, UInt32 txIndex, UInt256 txHash, ImmutableBitArray unspentOutputs)
        {
            this._blockHash = blockHash;
            this._txIndex = txIndex;
            this._txHash = txHash;
            this._unspentOutputs = unspentOutputs;

            this.hashCode = blockHash.GetHashCode() ^ txIndex.GetHashCode() ^ txHash.GetHashCode() ^ unspentOutputs.GetHashCode();
        }
Beispiel #10
0
        public ChainedBlock(UInt256 blockHash, UInt256 previousBlockHash, int height, BigInteger totalWork)
        {
            this._blockHash = blockHash;
            this._previousBlockHash = previousBlockHash;
            this._height = height;
            this._totalWork = totalWork;

            this.hashCode = blockHash.GetHashCode() ^ previousBlockHash.GetHashCode() ^ height.GetHashCode() ^ totalWork.GetHashCode();
        }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = IdToken.GetHashCode();
         hashCode = (hashCode * 397) ^ (UserAddress != null ? UserAddress.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (TxHash != null ? TxHash.GetHashCode() : 0);
         return(hashCode);
     }
 }
Beispiel #12
0
        public UnspentTx(UInt256 blockHash, UInt32 txIndex, UInt256 txHash, ImmutableBitArray unspentOutputs)
        {
            this._blockHash      = blockHash;
            this._txIndex        = txIndex;
            this._txHash         = txHash;
            this._unspentOutputs = unspentOutputs;

            this.notDefault = true;
            this.hashCode   = blockHash.GetHashCode() ^ txIndex.GetHashCode() ^ txHash.GetHashCode() ^ unspentOutputs.GetHashCode();
        }
Beispiel #13
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = UserScriptHash.GetHashCode();
         hashCode = (hashCode * 397) ^ AssetId.GetHashCode();
         hashCode = (hashCode * 397) ^ Timestamp.GetHashCode();
         hashCode = (hashCode * 397) ^ TxId.GetHashCode();
         hashCode = (hashCode * 397) ^ Index.GetHashCode();
         return(hashCode);
     }
 }
Beispiel #14
0
 public override int GetHashCode()
 {
     return PrevHash.GetHashCode() + PrevIndex.GetHashCode();
 }
 public override int GetHashCode()
 {
     return(PrevHash.GetHashCode() + PrevJsId.GetHashCode() + PrevIndex.GetHashCode());
 }
Beispiel #16
0
 private object GetBlockLock(UInt256 blockHash)
 {
     return(this.presentBlockTxesLocks[Math.Abs(blockHash.GetHashCode()) % this.presentBlockTxesLocks.Length]);
 }
Beispiel #17
0
 public override int GetHashCode()
 {
     return(PrevHash.GetHashCode() + PrevRCTSigId.GetHashCode() + PrevRCTSigIndex.GetHashCode());
 }
Beispiel #18
0
 public override int GetHashCode()
 {
     return(TxId.GetHashCode() + Index.GetHashCode());
 }
Beispiel #19
0
 public override int GetHashCode()
 {
     return(Hash.GetHashCode());
 }
Beispiel #20
0
 private object GetBlockLock(UInt256 blockHash)
 {
     return this.presentBlockTxesLocks[Math.Abs(blockHash.GetHashCode()) % this.presentBlockTxesLocks.Length];
 }
Beispiel #21
0
 /// <summary>
 /// 获得对象的HashCode
 /// </summary>
 /// <returns>返回对象的HashCode</returns>
 public override int GetHashCode()
 {
     TR.Enter();
     return(TR.Exit(PrevHash.GetHashCode() + PrevIndex.GetHashCode()));
 }