swarm/storage: simplify ChunkValidator interface (#18285)
This commit is contained in:
committed by
Anton Evangelatov
parent
ebbf3dfafb
commit
4e6f53ac33
@ -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")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user