append Now accepts lists again
This commit is contained in:
@@ -301,8 +301,7 @@ impl SealedBlock {
|
||||
pub fn rlp_bytes(&self) -> Bytes {
|
||||
let mut block_rlp = RlpStream::new_list(3);
|
||||
self.block.base.header.stream_rlp(&mut block_rlp, Seal::With);
|
||||
block_rlp.begin_list(self.block.receipts.len());
|
||||
for t in &self.block.base.transactions { t.rlp_append(&mut block_rlp); }
|
||||
block_rlp.append(&self.block.base.transactions);
|
||||
block_rlp.append_raw(&self.uncle_bytes, 1);
|
||||
block_rlp.out()
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ impl Encodable for BlockDetails {
|
||||
s.append(&self.number);
|
||||
s.append(&self.total_difficulty);
|
||||
s.append(&self.parent);
|
||||
s.append_list(&self.children);
|
||||
s.append(&self.children);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ impl Decodable for BlockLogBlooms {
|
||||
|
||||
impl Encodable for BlockLogBlooms {
|
||||
fn rlp_append(&self, s: &mut RlpStream) {
|
||||
s.append_list(&self.blooms);
|
||||
s.append(&self.blooms);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ impl Decodable for BlocksBlooms {
|
||||
impl Encodable for BlocksBlooms {
|
||||
fn rlp_append(&self, s: &mut RlpStream) {
|
||||
let blooms_ref: &[H2048] = &self.blooms;
|
||||
s.append_list(&blooms_ref);
|
||||
s.append(&blooms_ref);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ impl Encodable for LogEntry {
|
||||
fn rlp_append(&self, s: &mut RlpStream) {
|
||||
s.begin_list(3);
|
||||
s.append(&self.address);
|
||||
s.append_list(&self.topics);
|
||||
s.append(&self.topics);
|
||||
s.append(&self.data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,6 @@ impl Encodable for Receipt {
|
||||
s.append(&self.state_root);
|
||||
s.append(&self.gas_used);
|
||||
s.append(&self.log_bloom);
|
||||
s.append_list(&self.logs);
|
||||
s.append(&self.logs);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ mod tests {
|
||||
for t in transactions {
|
||||
rlp.append_raw(&t.rlp_bytes_opt(Seal::With), 1);
|
||||
}
|
||||
rlp.append_list(&uncles);
|
||||
rlp.append(&uncles);
|
||||
rlp.out().to_vec()
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ mod tests {
|
||||
|
||||
let good_uncles = vec![ good_uncle1.clone(), good_uncle2.clone() ];
|
||||
let mut uncles_rlp = RlpStream::new();
|
||||
uncles_rlp.append_list(&good_uncles);
|
||||
uncles_rlp.append(&good_uncles);
|
||||
let good_uncles_hash = uncles_rlp.as_raw().sha3();
|
||||
let good_transactions_root = ordered_trie_root(good_transactions.iter().map(|t| t.rlp_bytes_opt(Seal::With)).collect());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user