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

@ -366,7 +366,7 @@ func TestValidator(t *testing.T) {
if err != nil {
t.Fatal(err)
}
if !rh.Validate(chunk.Address(), chunk.Data()) {
if !rh.Validate(chunk) {
t.Fatal("Chunk validator fail on update chunk")
}
@ -375,7 +375,7 @@ func TestValidator(t *testing.T) {
address[0] = 11
address[15] = 99
if rh.Validate(address, chunk.Data()) {
if rh.Validate(storage.NewChunk(address, chunk.Data())) {
t.Fatal("Expected Validate to fail with false chunk address")
}
}