core/rawdb: fix typos

This commit is contained in:
bstnfr 2023-09-28 13:19:33 +02:00
parent 86df4ab757
commit be5e856204
4 changed files with 8 additions and 8 deletions

View file

@ -200,7 +200,7 @@ func (f *chainFreezer) freeze(db ethdb.KeyValueStore) {
} }
batch.Reset() batch.Reset()
// Step into the future and delete and dangling side chains // Step into the future and delete any dangling side chains
if frozen > 0 { if frozen > 0 {
tip := frozen tip := frozen
for len(dangling) > 0 { for len(dangling) > 0 {

View file

@ -34,7 +34,7 @@ import (
"github.com/olekukonko/tablewriter" "github.com/olekukonko/tablewriter"
) )
// freezerdb is a database wrapper that enabled freezer data retrievals. // freezerdb is a database wrapper that enables freezer data retrievals.
type freezerdb struct { type freezerdb struct {
ancientRoot string ancientRoot string
ethdb.KeyValueStore ethdb.KeyValueStore
@ -141,7 +141,7 @@ func (db *nofreezedb) ReadAncients(fn func(reader ethdb.AncientReaderOp) error)
// Unlike other ancient-related methods, this method does not return // Unlike other ancient-related methods, this method does not return
// errNotSupported when invoked. // errNotSupported when invoked.
// The reason for this is that the caller might want to do several things: // The reason for this is that the caller might want to do several things:
// 1. Check if something is in freezer, // 1. Check if something is in the freezer,
// 2. If not, check leveldb. // 2. If not, check leveldb.
// //
// This will work, since the ancient-checks inside 'fn' will return errors, // This will work, since the ancient-checks inside 'fn' will return errors,
@ -209,7 +209,7 @@ func NewDatabaseWithFreezer(db ethdb.KeyValueStore, ancient string, namespace st
// of the freezer and database. Ensure that we don't shoot ourselves in the foot // of the freezer and database. Ensure that we don't shoot ourselves in the foot
// by serving up conflicting data, leading to both datastores getting corrupted. // by serving up conflicting data, leading to both datastores getting corrupted.
// //
// - If both the freezer and key-value store is empty (no genesis), we just // - If both the freezer and key-value store are empty (no genesis), we just
// initialized a new empty freezer, so everything's fine. // initialized a new empty freezer, so everything's fine.
// - If the key-value store is empty, but the freezer is not, we need to make // - If the key-value store is empty, but the freezer is not, we need to make
// sure the user's genesis matches the freezer. That will be checked in the // sure the user's genesis matches the freezer. That will be checked in the
@ -218,7 +218,7 @@ func NewDatabaseWithFreezer(db ethdb.KeyValueStore, ancient string, namespace st
// - If neither the key-value store nor the freezer is empty, cross validate // - If neither the key-value store nor the freezer is empty, cross validate
// the genesis hashes to make sure they are compatible. If they are, also // the genesis hashes to make sure they are compatible. If they are, also
// ensure that there's no gap between the freezer and subsequently leveldb. // ensure that there's no gap between the freezer and subsequently leveldb.
// - If the key-value store is not empty, but the freezer is we might just be // - If the key-value store is not empty, but the freezer is, we might just be
// upgrading to the freezer release, or we might have had a small chain and // upgrading to the freezer release, or we might have had a small chain and
// not frozen anything yet. Ensure that no blocks are missing yet from the // not frozen anything yet. Ensure that no blocks are missing yet from the
// key-value store, since that would mean we already had an old freezer. // key-value store, since that would mean we already had an old freezer.
@ -634,7 +634,7 @@ func printChainMetadata(db ethdb.KeyValueStore) {
fmt.Fprintf(os.Stderr, "\n\n") fmt.Fprintf(os.Stderr, "\n\n")
} }
// ReadChainMetadata returns a set of key/value pairs that contains informatin // ReadChainMetadata returns a set of key/value pairs that contains information
// about the database chain status. This can be used for diagnostic purposes // about the database chain status. This can be used for diagnostic purposes
// when investigating the state of the node. // when investigating the state of the node.
func ReadChainMetadata(db ethdb.KeyValueStore) [][]string { func ReadChainMetadata(db ethdb.KeyValueStore) [][]string {

View file

@ -23,7 +23,7 @@ import (
"github.com/ethereum/go-ethereum/ethdb/pebble" "github.com/ethereum/go-ethereum/ethdb/pebble"
) )
// Pebble is unsuported on 32bit architecture // Pebble is unsupported on 32bit architecture
const PebbleEnabled = true const PebbleEnabled = true
// NewPebbleDBDatabase creates a persistent key-value database without a freezer // NewPebbleDBDatabase creates a persistent key-value database without a freezer

View file

@ -219,7 +219,7 @@ func (b *tableBatch) Put(key, value []byte) error {
return b.batch.Put(append([]byte(b.prefix), key...), value) return b.batch.Put(append([]byte(b.prefix), key...), value)
} }
// Delete inserts the a key removal into the batch for later committing. // Delete inserts a key removal into the batch for later committing.
func (b *tableBatch) Delete(key []byte) error { func (b *tableBatch) Delete(key []byte) error {
return b.batch.Delete(append([]byte(b.prefix), key...)) return b.batch.Delete(append([]byte(b.prefix), key...))
} }