core: move write caching layer into MemCacheStore
Simplify Blockchain and associated functions, deduplicate code, fix Get() and Seek() implementations.
This commit is contained in:
parent
4822c736bb
commit
fc0031e5aa
10 changed files with 283 additions and 197 deletions
|
@ -57,7 +57,7 @@ func TestAddBlock(t *testing.T) {
|
|||
|
||||
for _, block := range blocks {
|
||||
key := storage.AppendPrefix(storage.DataBlock, block.Hash().BytesReverse())
|
||||
if _, err := bc.Get(key); err != nil {
|
||||
if _, err := bc.store.Get(key); err != nil {
|
||||
t.Fatalf("block %s not persisted", block.Hash())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue