finishe signed transactions

This commit is contained in:
debris
2016-02-04 23:48:29 +01:00
parent e92c6ee719
commit eab8410402
9 changed files with 164 additions and 229 deletions

View File

@@ -103,12 +103,12 @@ fn create_unverifiable_block(order: u32, parent_hash: H256) -> Bytes {
create_test_block(&create_unverifiable_block_header(order, parent_hash))
}
pub fn create_test_block_with_data(header: &Header, transactions: &[&Transaction], uncles: &[Header]) -> Bytes {
pub fn create_test_block_with_data(header: &Header, transactions: &[&SignedTransaction], uncles: &[Header]) -> Bytes {
let mut rlp = RlpStream::new_list(3);
rlp.append(header);
rlp.begin_list(transactions.len());
for t in transactions {
rlp.append_raw(&t.rlp_bytes_opt(Seal::With), 1);
rlp.append_raw(&encode::<SignedTransaction>(t).to_vec(), 1);
}
rlp.append(&uncles);
rlp.out()