mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 21:08:32 +00:00
Refine and test slashing protection semantics (#1885)
## Issue Addressed Closes #1873 ## Proposed Changes Fixes the bug in slashing protection import (#1873) by pruning the database upon import. Also expands the test generator to cover this case and a few others which are under discussion here: https://ethereum-magicians.org/t/eip-3076-validator-client-interchange-format-slashing-protection/4883 ## Additional Info Depending on the outcome of the discussion on Eth Magicians, we can either wait for consensus before merging, or merge our preferred solution and patch things later.
This commit is contained in:
@@ -135,7 +135,7 @@ fn roundtrip_database(dir: &TempDir, db: &SlashingDatabase, is_empty: bool) {
|
||||
let new_db =
|
||||
SlashingDatabase::create(&dir.path().join("roundtrip_slashing_protection.sqlite")).unwrap();
|
||||
new_db
|
||||
.import_interchange_info(&exported, DEFAULT_GENESIS_VALIDATORS_ROOT)
|
||||
.import_interchange_info(exported.clone(), DEFAULT_GENESIS_VALIDATORS_ROOT)
|
||||
.unwrap();
|
||||
let reexported = new_db
|
||||
.export_interchange_info(DEFAULT_GENESIS_VALIDATORS_ROOT)
|
||||
|
||||
Reference in New Issue
Block a user