Commit 5d79e53d authored by Jakub Sztandera's avatar Jakub Sztandera

blockstore: rename RuntimeHashing to HashOnRead

License: MIT
Signed-off-by: default avatarJakub Sztandera <kubuxu@protonmail.ch>
parent 6877d287
......@@ -76,7 +76,7 @@ type blockstore struct {
rehash bool
}
func (bs *blockstore) RuntimeHashing(enabled bool) {
func (bs *blockstore) HashOnRead(enabled bool) {
bs.rehash = enabled
}
......
......@@ -53,7 +53,7 @@ func TestPutThenGetBlock(t *testing.T) {
}
}
func TestRuntimeHashing(t *testing.T) {
func TestHashOnRead(t *testing.T) {
orginalDebug := u.Debug
defer (func() {
u.Debug = orginalDebug
......@@ -69,7 +69,7 @@ func TestRuntimeHashing(t *testing.T) {
bl2 := blocks.NewBlock([]byte("some other data"))
bs.Put(blBad)
bs.Put(bl2)
bs.RuntimeHashing(true)
bs.HashOnRead(true)
if _, err := bs.Get(bl.Key()); err != ErrHashMismatch {
t.Fatalf("expected '%v' got '%v'\n", ErrHashMismatch, err)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment