swarm/storage: simplify ChunkValidator interface (#18285)

This commit is contained in:
Javier Peletier
2018-12-12 16:22:17 +01:00
committed by Anton Evangelatov
parent ebbf3dfafb
commit 4e6f53ac33
7 changed files with 20 additions and 18 deletions

View File

@@ -92,7 +92,7 @@ func (ls *LocalStore) isValid(chunk Chunk) bool {
// ls.Validators contains a list of one validator per chunk type.
// if one validator succeeds, then the chunk is valid
for _, v := range ls.Validators {
if valid = v.Validate(chunk.Address(), chunk.Data()); valid {
if valid = v.Validate(chunk); valid {
break
}
}