Skip to content

Commit

Permalink
Remove unused methods
Browse files Browse the repository at this point in the history
  • Loading branch information
emhane committed Sep 8, 2022
1 parent ef1d76a commit ad01569
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -987,23 +987,6 @@ impl Ticket {
pub fn update_cum_wait(&mut self) {
self.cum_wait = self.cum_wait + self.wait_time;
}*/

pub fn encode(&self) -> Vec<u8> {
let mut buf = Vec::new();
let mut s = RlpStream::new();
s.append(self);
buf.extend_from_slice(&s.out());
buf
}

pub fn decode(ticket: &[u8]) -> Result<Option<Self>, DecoderError> {
if !ticket.is_empty() {
let rlp = rlp::Rlp::new(ticket);
let ticket = rlp.as_val::<Ticket>()?;
return Ok(Some(ticket));
}
Ok(None)
}
}

impl std::fmt::Display for Ticket {
Expand Down

0 comments on commit ad01569

Please sign in to comment.