public static byte[] Encode(IRlpType value) { if (value is RlpString item) { return(EncodeString(item)); } return(EncodeList(value as RlpList)); }
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); } }