Arbitrary trait for eth2/types (#1040)

* Add the arbitrary type to eth2/types and their deps

Signed-off-by: Kirk Baird <baird.k@outlook.com>

* Wrap arbitrary in a feature flag

Signed-off-by: Kirk Baird <baird.k@outlook.com>

* Fix feature for types

Signed-off-by: Kirk Baird <baird.k@outlook.com>

* Fix comment

Signed-off-by: Kirk Baird <baird.k@outlook.com>

* Patch versioning

Signed-off-by: Kirk Baird <baird.k@outlook.com>

* Allow expanded crate reference for arbitrary 0.4.3

Signed-off-by: Kirk Baird <baird.k@outlook.com>

* Add arbitrary to remaining types

Signed-off-by: Kirk Baird <baird.k@outlook.com>

* use cmp::min

Signed-off-by: Kirk Baird <baird.k@outlook.com>

* Derive Arbitrary trait for ValidatorStatus, TotalBalances and InclusionInfo

* Add CI check for state processing arbitrary faetures

Signed-off-by: Kirk Baird <baird.k@outlook.com>

* Fix indentation

Signed-off-by: Kirk Baird <baird.k@outlook.com>

Co-authored-by: Mehdi Zerouali <mehdi@sigmaprime.io>
This commit is contained in:
Kirk Baird
2020-05-06 09:12:28 +10:00
committed by GitHub
parent fcccf63d29
commit 611a0c7d19
70 changed files with 436 additions and 292 deletions

View File

@@ -58,6 +58,10 @@ lint:
make-ef-tests:
make -C $(EF_TESTS)
# Verifies that state_processing feature arbitrary-fuzz will compile
arbitrary-fuzz:
cargo check --manifest-path=eth2/state_processing/Cargo.toml --features arbitrary-fuzz
# Performs a `cargo` clean and cleans the `ef_tests` directory.
clean:
cargo clean