示例#1
0
        /// <summary>
        /// Called when the transaction becomes newly dead, that is, we learn that one of its inputs has already been spent
        /// in such a way that the double-spending transaction takes precedence over this one. It will not become valid now
        /// unless there is a re-org. Automatically sets the confidence type to DEAD.
        /// </summary>


        /// <summary>
        /// Returns a copy of this object. Event listeners are not duplicated. </summary>

        public virtual TransactionConfidence duplicate()
        {
            var c = new TransactionConfidence(transaction)
            {
                confidenceLevel       = confidenceLevel,
                overridingTransaction = overridingTransaction,
                appearedAtChainHeight = appearedAtChainHeight
            };

            foreach (var peerAddress in broadcastBy)
            {
                c.broadcastBy.Add(peerAddress);
            }

            return(c);
        }
        /// <summary>
        /// Called when the transaction becomes newly dead, that is, we learn that one of its inputs has already been spent
        /// in such a way that the double-spending transaction takes precedence over this one. It will not become valid now
        /// unless there is a re-org. Automatically sets the confidence type to DEAD.
        /// </summary>
        /// <summary>
        /// Returns a copy of this object. Event listeners are not duplicated. </summary>
        public virtual TransactionConfidence duplicate()
        {
            var c = new TransactionConfidence(transaction)
                                          {
                                              confidenceLevel = confidenceLevel,
                                              overridingTransaction = overridingTransaction,
                                              appearedAtChainHeight = appearedAtChainHeight
                                          };
            foreach (var peerAddress in broadcastBy)
            {
                c.broadcastBy.Add(peerAddress);
            }

            return c;
        }