diff options
author | zsfelfoldi <zsfelfoldi@gmail.com> | 2016-04-05 21:22:04 +0800 |
---|---|---|
committer | zsfelfoldi <zsfelfoldi@gmail.com> | 2016-06-07 22:38:56 +0800 |
commit | f9917c8c7b6d16daadebd72977e56a8adc0382b0 (patch) | |
tree | eb11524c618a44dbd499918761ba176a9addba58 /core/bench_test.go | |
parent | 5a458da42ae9a6525989c2d4515c6fa573ba8f8c (diff) | |
download | go-tangerine-f9917c8c7b6d16daadebd72977e56a8adc0382b0.tar go-tangerine-f9917c8c7b6d16daadebd72977e56a8adc0382b0.tar.gz go-tangerine-f9917c8c7b6d16daadebd72977e56a8adc0382b0.tar.bz2 go-tangerine-f9917c8c7b6d16daadebd72977e56a8adc0382b0.tar.lz go-tangerine-f9917c8c7b6d16daadebd72977e56a8adc0382b0.tar.xz go-tangerine-f9917c8c7b6d16daadebd72977e56a8adc0382b0.tar.zst go-tangerine-f9917c8c7b6d16daadebd72977e56a8adc0382b0.zip |
core: improved chainDb using sequential keys
Diffstat (limited to 'core/bench_test.go')
-rw-r--r-- | core/bench_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
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) } } |