diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index e265fe4c0..87ad26647 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -582,7 +582,7 @@ impl BlockChainClient for Client { fn uncle(&self, id: UncleID) -> Option { let index = id.position; - self.block(id.block).and_then(|block| BlockView::new(&block).uncle_at(index).and_then(|u| Some(u.rlp(Seal::With)))) + self.block(id.block).and_then(|block| BlockView::new(&block).uncle_rlp_at(index)) } fn transaction_receipt(&self, id: TransactionID) -> Option { diff --git a/ethcore/src/views/block.rs b/ethcore/src/views/block.rs index 82b8fb805..42fd52a20 100644 --- a/ethcore/src/views/block.rs +++ b/ethcore/src/views/block.rs @@ -139,6 +139,11 @@ impl<'a> BlockView<'a> { pub fn uncle_at(&self, index: usize) -> Option
{ self.rlp.at(2).iter().nth(index).map(|rlp| rlp.as_val()) } + + /// Return nth uncle rlp. + pub fn uncle_rlp_at(&self, index: usize) -> Option { + self.rlp.at(2).iter().nth(index).map(|rlp| rlp.as_raw().to_vec()) + } } impl<'a> Hashable for BlockView<'a> {