Stub out getBlocksSince and getBlock methods (#6853)

* Add getBlocksSince rpc method, and initial stub of getBlock method

* Return test transactions from getBlock method

* clippy

* Add comment on get_block method
This commit is contained in:
Tyera Eulberg
2019-11-11 13:18:34 -05:00
committed by GitHub
parent 596d30661a
commit cc6e1ea200
3 changed files with 136 additions and 31 deletions

View File

@@ -199,18 +199,21 @@ impl Validator {
bank.slots_per_segment(),
);
let blocktree = Arc::new(blocktree);
let rpc_service = if node.info.rpc.port() == 0 {
None
} else {
Some(JsonRpcService::new(
&cluster_info,
SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), node.info.rpc.port()),
storage_state.clone(),
config.rpc_config.clone(),
bank_forks.clone(),
block_commitment_cache.clone(),
ledger_path,
blocktree.clone(),
&cluster_info,
genesis_hash,
ledger_path,
storage_state.clone(),
&validator_exit,
))
};
@@ -244,8 +247,6 @@ impl Validator {
std::thread::park();
}
let blocktree = Arc::new(blocktree);
let poh_config = Arc::new(poh_config);
let (mut poh_recorder, entry_receiver) = PohRecorder::new_with_clear_signal(
bank.tick_height(),