diff options
author | bojie <bojie@dexon.org> | 2019-03-11 17:43:52 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-03-12 12:19:09 +0800 |
commit | 390b0f5aa6d7a5127a04b8949815033d59608e7b (patch) | |
tree | 240c9999c6b84028645bdd83891da10708fe8499 /core/rawdb | |
parent | 2af2607585ee7145fe49d8ab4eba400dddad942d (diff) | |
download | dexon-390b0f5aa6d7a5127a04b8949815033d59608e7b.tar dexon-390b0f5aa6d7a5127a04b8949815033d59608e7b.tar.gz dexon-390b0f5aa6d7a5127a04b8949815033d59608e7b.tar.bz2 dexon-390b0f5aa6d7a5127a04b8949815033d59608e7b.tar.lz dexon-390b0f5aa6d7a5127a04b8949815033d59608e7b.tar.xz dexon-390b0f5aa6d7a5127a04b8949815033d59608e7b.tar.zst dexon-390b0f5aa6d7a5127a04b8949815033d59608e7b.zip |
app: new app test flow (#244)
Diffstat (limited to 'core/rawdb')
-rw-r--r-- | core/rawdb/accessors_chain.go | 15 | ||||
-rw-r--r-- | core/rawdb/schema.go | 2 |
2 files changed, 0 insertions, 17 deletions
diff --git a/core/rawdb/accessors_chain.go b/core/rawdb/accessors_chain.go index 5e23bef8f..801ad9362 100644 --- a/core/rawdb/accessors_chain.go +++ b/core/rawdb/accessors_chain.go @@ -348,21 +348,6 @@ func WriteBlock(db DatabaseWriter, block *types.Block) { WriteHeader(db, block.Header()) } -// ReadLastRoundNumber get current round number. -func ReadLastRoundNumber(db DatabaseReader) (uint64, error) { - number, err := db.Get(lastRoundNum) - if err != nil { - return 0, err - } - - return new(big.Int).SetBytes(number).Uint64(), nil -} - -// WriteLastRoundNumber write current round number. -func WriteLastRoundNumber(db DatabaseWriter, number uint64) error { - return db.Put(lastRoundNum, new(big.Int).SetUint64(number).Bytes()) -} - // DeleteBlock removes all block data associated with a hash. func DeleteBlock(db DatabaseDeleter, hash common.Hash, number uint64) { DeleteReceipts(db, hash, number) diff --git a/core/rawdb/schema.go b/core/rawdb/schema.go index 954ebfc1d..87a56c0ba 100644 --- a/core/rawdb/schema.go +++ b/core/rawdb/schema.go @@ -63,8 +63,6 @@ var ( // Chain index prefixes (use `i` + single byte to avoid mixing data types). BloomBitsIndexPrefix = []byte("iB") // BloomBitsIndexPrefix is the data table of a chain indexer to track its progress - lastRoundNum = []byte("LastRoundNum") - preimageCounter = metrics.NewRegisteredCounter("db/preimage/total", nil) preimageHitCounter = metrics.NewRegisteredCounter("db/preimage/hits", nil) ) |