uncle returns rlp
This commit is contained in:
parent
562e591ed3
commit
5337de8d42
@ -48,6 +48,7 @@ pub use types::blockchain_info::BlockChainInfo;
|
||||
pub use types::block_status::BlockStatus;
|
||||
use evm::Factory as EvmFactory;
|
||||
use miner::{Miner, MinerService, TransactionImportResult, AccountDetails};
|
||||
use basic_types::*;
|
||||
|
||||
use ipc::IpcConfig;
|
||||
use ipc::binary::{BinaryConvertable, BinaryConvertError};
|
||||
@ -576,9 +577,9 @@ impl BlockChainClient for Client {
|
||||
self.transaction_address(id).and_then(|address| self.chain.transaction(&address))
|
||||
}
|
||||
|
||||
fn uncle(&self, id: UncleID) -> Option<Header> {
|
||||
fn uncle(&self, id: UncleID) -> Option<Bytes> {
|
||||
let index = id.position;
|
||||
self.block(id.block).and_then(|block| BlockView::new(&block).uncle_at(index))
|
||||
self.block(id.block).and_then(|block| BlockView::new(&block).uncle_at(index).and_then(|u| Some(u.rlp(Seal::With))))
|
||||
}
|
||||
|
||||
fn transaction_receipt(&self, id: TransactionID) -> Option<LocalizedReceipt> {
|
||||
|
@ -126,7 +126,7 @@ pub trait BlockChainClient : Sync + Send {
|
||||
fn transaction(&self, id: TransactionID) -> Option<LocalizedTransaction>;
|
||||
|
||||
/// Get uncle with given id.
|
||||
fn uncle(&self, id: UncleID) -> Option<Header>;
|
||||
fn uncle(&self, id: UncleID) -> Option<Bytes>;
|
||||
|
||||
/// Get transaction receipt with given hash.
|
||||
fn transaction_receipt(&self, id: TransactionID) -> Option<LocalizedReceipt>;
|
||||
|
@ -294,7 +294,7 @@ impl BlockChainClient for TestBlockChainClient {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
fn uncle(&self, _id: UncleID) -> Option<BlockHeader> {
|
||||
fn uncle(&self, _id: UncleID) -> Option<Bytes> {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user