fixed to return receipts grouped by requested block

This commit is contained in:
Nikolay Volf
2016-03-12 19:23:17 +01:00
parent bd9cfb4ee5
commit 0684abd345
2 changed files with 15 additions and 10 deletions

View File

@@ -24,6 +24,7 @@ use header::{Header as BlockHeader, BlockNumber};
use filter::Filter;
use log_entry::LocalizedLogEntry;
use receipt::Receipt;
use extras::BlockReceipts;
use error::{ImportResult, Error};
use block_queue::BlockQueueInfo;
use block::ClosedBlock;
@@ -254,10 +255,10 @@ impl BlockChainClient for TestBlockChainClient {
fn block_receipts(&self, hash: &H256) -> Option<Bytes> {
// starts with 'f' ?
if *hash > H256::from("f000000000000000000000000000000000000000000000000000000000000000") {
let receipt = Receipt::new(
let receipt = BlockReceipts::new(vec![Receipt::new(
H256::zero(),
U256::zero(),
vec![]);
vec![])]);
let mut rlp = RlpStream::new();
rlp.append(&receipt);
return Some(rlp.out());