X-Git-Url: https://git.novaco.in/?p=NovacoinLibrary.git;a=blobdiff_plain;f=Novacoin%2FCOutPoint.cs;h=b236ccd324eed05ad57e7dbce5420109b3e44df9;hp=09d0690a1d7b5428f6c8a7539a00b55414ad82d7;hb=9412f7e6043098c038a18ccb5a8be04e2ea147c1;hpb=7e181e309fe7da756ee2e8010740e9b00df44ce5 diff --git a/Novacoin/COutPoint.cs b/Novacoin/COutPoint.cs index 09d0690..b236ccd 100644 --- a/Novacoin/COutPoint.cs +++ b/Novacoin/COutPoint.cs @@ -88,6 +88,11 @@ namespace Novacoin return outBytes; } + public static implicit operator COutPoint(byte[] b) + { + return new COutPoint(b); + } + public override string ToString() { var sb = new StringBuilder(); @@ -123,6 +128,11 @@ namespace Novacoin /// Result of comparison. public bool Equals(COutPoint o) { + if (object.ReferenceEquals(o, null)) + { + return false; + } + return (o.n == n) && (o.hash == hash); } }