Exemplo n.º 1
0
 public static byte[] Encode(IRlpType value)
 {
     if (value is RlpString item)
     {
         return(EncodeString(item));
     }
     return(EncodeList(value as RlpList));
 }
Exemplo n.º 2
0
 public bool RlpCompare(IRlpType rlpType, IRLPElement iRLPElement)
 {
     if (rlpType is RlpList vCollection)
     {
         if (iRLPElement is RLPCollection nCollection && vCollection.Count == nCollection.Count)
         {
             for (var i = 0; i < vCollection.Count; i++)
             {
                 if (!RlpCompare(vCollection[i], nCollection[i]))
                 {
                     return(false);
                 }
             }
         }
         else
         {
             return(false);
         }
     }