예제 #1
0
        public void TestHashCode()
        {
            var a1 = AccountId.FromAddress(randomXqvWyhPcWjBE7nawXLTKH5YLNmSc);
            var a2 = AccountId.FromAddress(randomXqvWyhPcWjBE7nawXLTKH5YLNmSc);

            Assert.AreEqual(a1.GetHashCode(), a2.GetHashCode());
        }
예제 #2
0
            public override Hash160 FromString(string s)
            {
                if (s.StartsWith("r"))
                {
                    return(NewInstance(AccountId.FromAddress(s).Bytes));
                }

                return(base.FromString(s));
            }
예제 #3
0
        public void TestAccountIdLedgerIndex()
        {
            const string Addy                = "rP1coskQzayaQ9geMdJgAV5f3tNZcHghzH";
            const string LedgerIndex         = "D66D0EC951FD5707633BEBE74DB18B6D2DDA6771BA0FBF079AD08BFDE6066056";
            Hash256      expectedLedgerIndex = Hash256.OutTranslate.FromString(LedgerIndex);
            AccountId    accountId           = AccountId.FromAddress(Addy);
            Hash256      builtLedgerIndex    = Hash256.AccountIdLedgerIndex(accountId);

            Assert.AreEqual(expectedLedgerIndex, builtLedgerIndex);
        }
예제 #4
0
 public void TestBlackGoleAddyCheckSumFail()
 {
     Assert.Throws <EncodingFormatException>(
         () => AccountId.FromAddress("R" + randomXqvWyhPcWjBE7nawXLTKH5YLNmSc.Substring(1)));
 }
예제 #5
0
 public void TestBlackHoleAddy()
 {
     AccountId.FromAddress(randomXqvWyhPcWjBE7nawXLTKH5YLNmSc);
 }