mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 18:11:36 +01:00
31 lines
699 B
C#
31 lines
699 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using NBitcoin;
|
|
|
|
namespace BTCPayServer
|
|
{
|
|
public class TransactionComparer : IEqualityComparer<Transaction>
|
|
{
|
|
|
|
private static TransactionComparer _Instance = new TransactionComparer();
|
|
public static TransactionComparer Instance
|
|
{
|
|
get
|
|
{
|
|
return _Instance;
|
|
}
|
|
}
|
|
public bool Equals(Transaction x, Transaction y)
|
|
{
|
|
return x.GetHash() == y.GetHash();
|
|
}
|
|
|
|
public int GetHashCode(Transaction obj)
|
|
{
|
|
return obj.GetHash().GetHashCode();
|
|
}
|
|
}
|
|
}
|