Enable TransactionViews from the BlockView.

This commit is contained in:
Gav Wood 2016-01-16 21:04:14 +01:00
parent 667a0fad01
commit cbdc2ec80d

View File

@ -95,12 +95,12 @@ impl<'a> BlockView<'a> {
pub fn header_view(&self) -> HeaderView<'a> {
HeaderView::new_from_rlp(self.rlp.at(0))
}
/*
/// Return List of transactions in given block.
pub fn transactions(&self) -> Vec<TransactionView> {
pub fn transaction_views(&self) -> Vec<TransactionView> {
self.rlp.at(1).iter().map(|rlp| TransactionView::new_from_rlp(rlp)).collect()
}
*/
/// Return List of transactions in given block.
pub fn transactions(&self) -> Vec<Transaction> {
self.rlp.val_at(1)