diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-04 22:33:12 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-04 22:33:12 +0800 |
commit | 29f120206e16f80176a0cb309162cc7f889be0b0 (patch) | |
tree | 500188b663719000ead9bde79a2d1493539d7de3 /core/block_cache_test.go | |
parent | 0d1a9ce64847775b19ab1f0bbb7b2cc7771e862a (diff) | |
download | go-tangerine-29f120206e16f80176a0cb309162cc7f889be0b0.tar go-tangerine-29f120206e16f80176a0cb309162cc7f889be0b0.tar.gz go-tangerine-29f120206e16f80176a0cb309162cc7f889be0b0.tar.bz2 go-tangerine-29f120206e16f80176a0cb309162cc7f889be0b0.tar.lz go-tangerine-29f120206e16f80176a0cb309162cc7f889be0b0.tar.xz go-tangerine-29f120206e16f80176a0cb309162cc7f889be0b0.tar.zst go-tangerine-29f120206e16f80176a0cb309162cc7f889be0b0.zip |
Added block cache delete method
Diffstat (limited to 'core/block_cache_test.go')
-rw-r--r-- | core/block_cache_test.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/block_cache_test.go b/core/block_cache_test.go index d4f610b71..434b97792 100644 --- a/core/block_cache_test.go +++ b/core/block_cache_test.go @@ -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") + } +} |