Expose tracing all the way to BlockChain; now it's up to blockchain to integrate.

This commit is contained in:
Gav Wood
2016-03-19 13:37:47 +01:00
parent 203438fb42
commit 66837452c2
4 changed files with 18 additions and 12 deletions

View File

@@ -54,6 +54,9 @@ impl Default for BlockChainConfig {
/// Interface for querying blocks by hash and by number.
pub trait BlockProvider {
/// True if we store full tracing information for transactions.
fn have_tracing(&self) -> bool;
/// Returns true if the given block is known
/// (though not necessarily a part of the canon chain).
fn is_known(&self, hash: &H256) -> bool;
@@ -177,6 +180,9 @@ impl BlockProvider for BlockChain {
self.query_extras_exist(hash, &self.block_details)
}
// We do not store tracing information.
fn have_tracing(&self) -> bool { false }
/// Get raw block data
fn block(&self, hash: &H256) -> Option<Bytes> {
{