Add node/fork endpoint to HTTP API, tidy

This commit is contained in:
Paul Hauner
2019-05-27 11:34:22 +10:00
parent 705edf0e45
commit 255590ef3b
6 changed files with 158 additions and 69 deletions

View File

@@ -0,0 +1,12 @@
use beacon_chain::{BeaconChain, BeaconChainTypes};
use iron::typemap::Key;
use std::marker::PhantomData;
use std::sync::Arc;
pub struct BeaconChainKey<T> {
_phantom: PhantomData<T>,
}
impl<T: BeaconChainTypes + 'static> Key for BeaconChainKey<T> {
type Value = Arc<BeaconChain<T>>;
}