From f9917c8c7b6d16daadebd72977e56a8adc0382b0 Mon Sep 17 00:00:00 2001 From: zsfelfoldi Date: Tue, 5 Apr 2016 15:22:04 +0200 Subject: core: improved chainDb using sequential keys --- core/bench_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'core/bench_test.go') diff --git a/core/bench_test.go b/core/bench_test.go index 1ecd87cbd..c6029499a 100644 --- a/core/bench_test.go +++ b/core/bench_test.go @@ -231,11 +231,11 @@ func makeChainForBench(db ethdb.Database, full bool, count uint64) { hash = header.Hash() WriteHeader(db, header) WriteCanonicalHash(db, hash, n) - WriteTd(db, hash, big.NewInt(int64(n+1))) + WriteTd(db, hash, n, big.NewInt(int64(n+1))) if full || n == 0 { block := types.NewBlockWithHeader(header) - WriteBody(db, hash, block.Body()) - WriteBlockReceipts(db, hash, nil) + WriteBody(db, hash, n, block.Body()) + WriteBlockReceipts(db, hash, n, nil) } } } @@ -287,8 +287,8 @@ func benchReadChain(b *testing.B, full bool, count uint64) { header := chain.GetHeaderByNumber(n) if full { hash := header.Hash() - GetBody(db, hash) - GetBlockReceipts(db, hash) + GetBody(db, hash, n) + GetBlockReceipts(db, hash, n) } } -- cgit