public int GetLength(Block item, RlpBehaviors rlpBehaviors) { if (item == null) { return(1); } return(Rlp.LengthOfSequence(GetContentLength(item, rlpBehaviors).Total)); }
public int GetLength(LogEntry item, RlpBehaviors rlpBehaviors = RlpBehaviors.None) { if (item == null) { return(1); } return(Rlp.LengthOfSequence(GetContentLength(item).Total)); }
public int GetLength(Account item, RlpBehaviors rlpBehaviors = RlpBehaviors.None) { if (item == null) { return(1); } return(Rlp.LengthOfSequence(GetContentLength(item))); }
public Rlp Encode(Account item, RlpBehaviors rlpBehaviors = RlpBehaviors.None) { if (item == null) { return(Rlp.OfEmptySequence); } int contentLength = GetContentLength(item); RlpStream rlpStream = new RlpStream(Rlp.LengthOfSequence(contentLength)); rlpStream.StartSequence(contentLength); rlpStream.Encode(item.Nonce); rlpStream.Encode(item.Balance); rlpStream.Encode(item.StorageRoot); rlpStream.Encode(item.CodeHash); return(new Rlp(rlpStream.Data)); }
public int GetLength(TxReceipt item, RlpBehaviors rlpBehaviors) { return(Rlp.LengthOfSequence(GetContentLength(item, rlpBehaviors).Total)); }
public int GetLength(BlockHeader item, RlpBehaviors rlpBehaviors) { return(Rlp.LengthOfSequence(GetContentLength(item, rlpBehaviors))); }