Added block cache delete method

This commit is contained in:
obscuren
2015-04-04 16:33:12 +02:00
parent 0d1a9ce648
commit 29f120206e
2 changed files with 29 additions and 0 deletions

View File

@ -46,3 +46,15 @@ func TestInclusion(t *testing.T) {
}
}
}
func TestDeletion(t *testing.T) {
chain := newChain(3)
cache := NewBlockCache(3)
insertChainCache(cache, chain)
cache.Delete(chain[1].Hash())
if cache.Has(chain[1].Hash()) {
t.Errorf("expected %x not to be included")
}
}