Commit Graph

9 Commits

Author SHA1 Message Date
Luke Anderson
f48311900e Restructured response builder to give YAML or JSON when SSZ is not available, not just JSON. 2019-09-13 20:42:56 +10:00
Luke Anderson
1dd86baf1a Cleaning up the rest of the API functions.
- Removed all unused imports
 - Fixed random compiler errors
 - Removed all of the 'sucess_response' helpers.
 - Enabled all of the API endpoints again, wrapping in 'into_boxfut'
 - Tidied up /metrics endpoint
 - Added a 'body_text' part to ResponseBuilder, mainly for the Prometheus /metrics endpoint
 - Cleaned up the unnecessary helpers::* imports, to be more explicit.
2019-09-13 19:38:40 +10:00
Luke Anderson
82f4303787 Merge branch 'api-alignment' into validator-post-fns 2019-09-12 15:12:54 +10:00
Luke Anderson
c254ac8c2e Separated acquisition of BeaconChain and BeaconState. 2019-09-12 01:44:45 +10:00
Luke Anderson
b8667217f0 Made async functions work!
- Cleaned up imports
 - Moved ApiError and such to it's own error.rs
 - Obsoleted 'success_response' in favour of new async regular and json only flavours
 - Made ApiError work async and be derived from hyper errors
 - Added a check to ensure an error is thrown if a non-json encoding is requested on a json-only function
 - Made all the individual service functions return futures (only node and network for now)
2019-09-11 00:40:22 +10:00
Luke Anderson
99c673045c Moved chain/cache building into separate function, and made sure that all REST API endpoints are using this function to get the state. 2019-09-09 12:10:41 +10:00
Luke Anderson
eeba69cd0f Moved beacon chain from request functionality into its own function. 2019-09-04 22:03:55 +10:00
Paul Hauner
6875ae8af5 Pull Eth2Config during bootstrap 2019-08-27 00:04:15 +10:00
Paul Hauner
4f98a3985f Add first attempts at HTTP bootstrap 2019-08-14 10:36:55 +10:00