refactoring: Deduplicate code (#10090)

* Deduplicate sync committee indices from state

* Deduplicate code in listblocks RPC endpoints, which only differ in response object

* Deduplicate test code in config/fieldparams

* Delete stale benchmark target. This is already included in go_default_test

* deduplicate test cases in TestIsSlashableValidator_OK and fix blst
BUILD file

* Deduplicate TestStore_IsFinalizedChildBlock

* Revert crypto/bls/blst/BUILD.bazel

* Deduplicate TestStore_SaveBlock_NoDuplicates

* Use a generic wrapper for beacon blocks to streamline test

* Deduplicate TestStore_BlocksCRUD

* Deduplicate TestStore_BlocksHandleZeroCase

* Deduplicate TestStore_BlocksBatchDelete

* deduplicate TestStore_BlocksHandleInvalidEndSlot

* Deduplicate TestStore_BlocksCRUD_NoCache

* Deduplicate common block test setup. Make TestStore_Blocks_FiltersCorrectly support multiple forks in test

* Deduplicate the rest of these tests

* lint

* Deprecation warning

* Add test for WrappedSignedBeaconBlock

* Test error path
This commit is contained in:
Preston Van Loon
2022-01-16 12:44:42 -06:00
committed by GitHub
parent 3c54eb1cf6
commit 182bd615ac
15 changed files with 678 additions and 1809 deletions

View File

@@ -77,8 +77,6 @@ go_test(
srcs = [
"archived_point_test.go",
"backup_test.go",
"block_altair_test.go",
"block_merge_test.go",
"blocks_test.go",
"checkpoint_test.go",
"deposit_contract_test.go",