lighthouse/beacon_node/http_api/tests
Michael Sproul 2dc6163043 Add API version headers and map_fork_name! (#2745)
## Proposed Changes

* Add the `Eth-Consensus-Version` header to the HTTP API for the block and state endpoints. This is part of the v2.1.0 API that was recently released: https://github.com/ethereum/beacon-APIs/pull/170
* Add tests for the above. I refactored the `eth2` crate's helper functions to make this more straight-forward, and introduced some new mixin traits that I think greatly improve readability and flexibility.
* Add a new `map_with_fork!` macro which is useful for decoding a superstruct type without naming all its variants. It is now used for SSZ-decoding `BeaconBlock` and `BeaconState`, and for JSON-decoding `SignedBeaconBlock` in the API.

## Additional Info

The `map_with_fork!` changes will conflict with the Merge changes, but when resolving the conflict the changes from this branch should be preferred (it is no longer necessary to enumerate every fork). The merge fork _will_  need to be added to `map_fork_name_with`.
2021-10-28 01:18:04 +00:00
..
common.rs Rename eth2_libp2p to lighthouse_network (#2702) 2021-10-19 00:30:39 +00:00
fork_tests.rs Refactor Peerdb and PeerManager (#2660) 2021-10-11 02:45:06 +00:00
interactive_tests.rs Refactor Peerdb and PeerManager (#2660) 2021-10-11 02:45:06 +00:00
main.rs Fix chain_id value in config/deposit_contract RPC method (#2659) 2021-10-01 06:32:38 +00:00
tests.rs Add API version headers and map_fork_name! (#2745) 2021-10-28 01:18:04 +00:00