mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-14 16:03:45 +00:00
Merge branch 'ethereum:master' into portal
This commit is contained in:
commit
558a310cd5
13 changed files with 8 additions and 281 deletions
|
|
@ -200,13 +200,6 @@ func (t *table) NewBatchWithSize(size int) ethdb.Batch {
|
||||||
return &tableBatch{t.db.NewBatchWithSize(size), t.prefix}
|
return &tableBatch{t.db.NewBatchWithSize(size), t.prefix}
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewSnapshot creates a database snapshot based on the current state.
|
|
||||||
// The created snapshot will not be affected by all following mutations
|
|
||||||
// happened on the database.
|
|
||||||
func (t *table) NewSnapshot() (ethdb.Snapshot, error) {
|
|
||||||
return t.db.NewSnapshot()
|
|
||||||
}
|
|
||||||
|
|
||||||
// tableBatch is a wrapper around a database batch that prefixes each key access
|
// tableBatch is a wrapper around a database batch that prefixes each key access
|
||||||
// with a pre-configured string.
|
// with a pre-configured string.
|
||||||
type tableBatch struct {
|
type tableBatch struct {
|
||||||
|
|
|
||||||
|
|
@ -264,11 +264,7 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
|
||||||
if eth.APIBackend.allowUnprotectedTxs {
|
if eth.APIBackend.allowUnprotectedTxs {
|
||||||
log.Info("Unprotected transactions allowed")
|
log.Info("Unprotected transactions allowed")
|
||||||
}
|
}
|
||||||
gpoParams := config.GPO
|
eth.APIBackend.gpo = gasprice.NewOracle(eth.APIBackend, config.GPO, config.Miner.GasPrice)
|
||||||
if gpoParams.Default == nil {
|
|
||||||
gpoParams.Default = config.Miner.GasPrice
|
|
||||||
}
|
|
||||||
eth.APIBackend.gpo = gasprice.NewOracle(eth.APIBackend, gpoParams)
|
|
||||||
|
|
||||||
// Setup DNS discovery iterators.
|
// Setup DNS discovery iterators.
|
||||||
dnsclient := dnsdisc.NewClient(dnsdisc.Config{})
|
dnsclient := dnsdisc.NewClient(dnsdisc.Config{})
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ func TestFeeHistory(t *testing.T) {
|
||||||
MaxBlockHistory: c.maxBlock,
|
MaxBlockHistory: c.maxBlock,
|
||||||
}
|
}
|
||||||
backend := newTestBackend(t, big.NewInt(16), big.NewInt(28), c.pending)
|
backend := newTestBackend(t, big.NewInt(16), big.NewInt(28), c.pending)
|
||||||
oracle := NewOracle(backend, config)
|
oracle := NewOracle(backend, config, nil)
|
||||||
|
|
||||||
first, reward, baseFee, ratio, blobBaseFee, blobRatio, err := oracle.FeeHistory(context.Background(), c.count, c.last, c.percent)
|
first, reward, baseFee, ratio, blobBaseFee, blobRatio, err := oracle.FeeHistory(context.Background(), c.count, c.last, c.percent)
|
||||||
backend.teardown()
|
backend.teardown()
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,6 @@ type Config struct {
|
||||||
Percentile int
|
Percentile int
|
||||||
MaxHeaderHistory uint64
|
MaxHeaderHistory uint64
|
||||||
MaxBlockHistory uint64
|
MaxBlockHistory uint64
|
||||||
Default *big.Int `toml:",omitempty"`
|
|
||||||
MaxPrice *big.Int `toml:",omitempty"`
|
MaxPrice *big.Int `toml:",omitempty"`
|
||||||
IgnorePrice *big.Int `toml:",omitempty"`
|
IgnorePrice *big.Int `toml:",omitempty"`
|
||||||
}
|
}
|
||||||
|
|
@ -79,7 +78,7 @@ type Oracle struct {
|
||||||
|
|
||||||
// NewOracle returns a new gasprice oracle which can recommend suitable
|
// NewOracle returns a new gasprice oracle which can recommend suitable
|
||||||
// gasprice for newly created transaction.
|
// gasprice for newly created transaction.
|
||||||
func NewOracle(backend OracleBackend, params Config) *Oracle {
|
func NewOracle(backend OracleBackend, params Config, startPrice *big.Int) *Oracle {
|
||||||
blocks := params.Blocks
|
blocks := params.Blocks
|
||||||
if blocks < 1 {
|
if blocks < 1 {
|
||||||
blocks = 1
|
blocks = 1
|
||||||
|
|
@ -115,6 +114,9 @@ func NewOracle(backend OracleBackend, params Config) *Oracle {
|
||||||
maxBlockHistory = 1
|
maxBlockHistory = 1
|
||||||
log.Warn("Sanitizing invalid gasprice oracle max block history", "provided", params.MaxBlockHistory, "updated", maxBlockHistory)
|
log.Warn("Sanitizing invalid gasprice oracle max block history", "provided", params.MaxBlockHistory, "updated", maxBlockHistory)
|
||||||
}
|
}
|
||||||
|
if startPrice == nil {
|
||||||
|
startPrice = new(big.Int)
|
||||||
|
}
|
||||||
|
|
||||||
cache := lru.NewCache[cacheKey, processedFees](2048)
|
cache := lru.NewCache[cacheKey, processedFees](2048)
|
||||||
headEvent := make(chan core.ChainHeadEvent, 1)
|
headEvent := make(chan core.ChainHeadEvent, 1)
|
||||||
|
|
@ -131,7 +133,7 @@ func NewOracle(backend OracleBackend, params Config) *Oracle {
|
||||||
|
|
||||||
return &Oracle{
|
return &Oracle{
|
||||||
backend: backend,
|
backend: backend,
|
||||||
lastPrice: params.Default,
|
lastPrice: startPrice,
|
||||||
maxPrice: maxPrice,
|
maxPrice: maxPrice,
|
||||||
ignorePrice: ignorePrice,
|
ignorePrice: ignorePrice,
|
||||||
checkBlocks: blocks,
|
checkBlocks: blocks,
|
||||||
|
|
|
||||||
|
|
@ -235,7 +235,6 @@ func TestSuggestTipCap(t *testing.T) {
|
||||||
config := Config{
|
config := Config{
|
||||||
Blocks: 3,
|
Blocks: 3,
|
||||||
Percentile: 60,
|
Percentile: 60,
|
||||||
Default: big.NewInt(params.GWei),
|
|
||||||
}
|
}
|
||||||
var cases = []struct {
|
var cases = []struct {
|
||||||
fork *big.Int // London fork number
|
fork *big.Int // London fork number
|
||||||
|
|
@ -249,7 +248,7 @@ func TestSuggestTipCap(t *testing.T) {
|
||||||
}
|
}
|
||||||
for _, c := range cases {
|
for _, c := range cases {
|
||||||
backend := newTestBackend(t, c.fork, nil, false)
|
backend := newTestBackend(t, c.fork, nil, false)
|
||||||
oracle := NewOracle(backend, config)
|
oracle := NewOracle(backend, config, big.NewInt(params.GWei))
|
||||||
|
|
||||||
// The gas price sampled is: 32G, 31G, 30G, 29G, 28G, 27G
|
// The gas price sampled is: 32G, 31G, 30G, 29G, 28G, 27G
|
||||||
got, err := oracle.SuggestTipCap(context.Background())
|
got, err := oracle.SuggestTipCap(context.Background())
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,6 @@ type KeyValueStore interface {
|
||||||
Batcher
|
Batcher
|
||||||
Iteratee
|
Iteratee
|
||||||
Compacter
|
Compacter
|
||||||
Snapshotter
|
|
||||||
io.Closer
|
io.Closer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -199,6 +198,5 @@ type Database interface {
|
||||||
Iteratee
|
Iteratee
|
||||||
Stater
|
Stater
|
||||||
Compacter
|
Compacter
|
||||||
Snapshotter
|
|
||||||
io.Closer
|
io.Closer
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -318,69 +318,6 @@ func TestDatabaseSuite(t *testing.T, New func() ethdb.KeyValueStore) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("Snapshot", func(t *testing.T) {
|
|
||||||
db := New()
|
|
||||||
defer db.Close()
|
|
||||||
|
|
||||||
initial := map[string]string{
|
|
||||||
"k1": "v1", "k2": "v2", "k3": "", "k4": "",
|
|
||||||
}
|
|
||||||
for k, v := range initial {
|
|
||||||
db.Put([]byte(k), []byte(v))
|
|
||||||
}
|
|
||||||
snapshot, err := db.NewSnapshot()
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
for k, v := range initial {
|
|
||||||
got, err := snapshot.Get([]byte(k))
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
if !bytes.Equal(got, []byte(v)) {
|
|
||||||
t.Fatalf("Unexpected value want: %v, got %v", v, got)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Flush more modifications into the database, ensure the snapshot
|
|
||||||
// isn't affected.
|
|
||||||
var (
|
|
||||||
update = map[string]string{"k1": "v1-b", "k3": "v3-b"}
|
|
||||||
insert = map[string]string{"k5": "v5-b"}
|
|
||||||
delete = map[string]string{"k2": ""}
|
|
||||||
)
|
|
||||||
for k, v := range update {
|
|
||||||
db.Put([]byte(k), []byte(v))
|
|
||||||
}
|
|
||||||
for k, v := range insert {
|
|
||||||
db.Put([]byte(k), []byte(v))
|
|
||||||
}
|
|
||||||
for k := range delete {
|
|
||||||
db.Delete([]byte(k))
|
|
||||||
}
|
|
||||||
for k, v := range initial {
|
|
||||||
got, err := snapshot.Get([]byte(k))
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
if !bytes.Equal(got, []byte(v)) {
|
|
||||||
t.Fatalf("Unexpected value want: %v, got %v", v, got)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for k := range insert {
|
|
||||||
got, err := snapshot.Get([]byte(k))
|
|
||||||
if err == nil || len(got) != 0 {
|
|
||||||
t.Fatal("Unexpected value")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for k := range delete {
|
|
||||||
got, err := snapshot.Get([]byte(k))
|
|
||||||
if err != nil || len(got) == 0 {
|
|
||||||
t.Fatal("Unexpected deletion")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
t.Run("OperationsAfterClose", func(t *testing.T) {
|
t.Run("OperationsAfterClose", func(t *testing.T) {
|
||||||
db := New()
|
db := New()
|
||||||
db.Put([]byte("key"), []byte("value"))
|
db.Put([]byte("key"), []byte("value"))
|
||||||
|
|
|
||||||
|
|
@ -230,19 +230,6 @@ func (db *Database) NewIterator(prefix []byte, start []byte) ethdb.Iterator {
|
||||||
return db.db.NewIterator(bytesPrefixRange(prefix, start), nil)
|
return db.db.NewIterator(bytesPrefixRange(prefix, start), nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewSnapshot creates a database snapshot based on the current state.
|
|
||||||
// The created snapshot will not be affected by all following mutations
|
|
||||||
// happened on the database.
|
|
||||||
// Note don't forget to release the snapshot once it's used up, otherwise
|
|
||||||
// the stale data will never be cleaned up by the underlying compactor.
|
|
||||||
func (db *Database) NewSnapshot() (ethdb.Snapshot, error) {
|
|
||||||
snap, err := db.db.GetSnapshot()
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return &snapshot{db: snap}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Stat returns the statistic data of the database.
|
// Stat returns the statistic data of the database.
|
||||||
func (db *Database) Stat() (string, error) {
|
func (db *Database) Stat() (string, error) {
|
||||||
var stats leveldb.DBStats
|
var stats leveldb.DBStats
|
||||||
|
|
@ -498,26 +485,3 @@ func bytesPrefixRange(prefix, start []byte) *util.Range {
|
||||||
r.Start = append(r.Start, start...)
|
r.Start = append(r.Start, start...)
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
// snapshot wraps a leveldb snapshot for implementing the Snapshot interface.
|
|
||||||
type snapshot struct {
|
|
||||||
db *leveldb.Snapshot
|
|
||||||
}
|
|
||||||
|
|
||||||
// Has retrieves if a key is present in the snapshot backing by a key-value
|
|
||||||
// data store.
|
|
||||||
func (snap *snapshot) Has(key []byte) (bool, error) {
|
|
||||||
return snap.db.Has(key, nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get retrieves the given key if it's present in the snapshot backing by
|
|
||||||
// key-value data store.
|
|
||||||
func (snap *snapshot) Get(key []byte) ([]byte, error) {
|
|
||||||
return snap.db.Get(key, nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release releases associated resources. Release should always succeed and can
|
|
||||||
// be called multiple times without causing error.
|
|
||||||
func (snap *snapshot) Release() {
|
|
||||||
snap.db.Release()
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -35,10 +35,6 @@ var (
|
||||||
// errMemorydbNotFound is returned if a key is requested that is not found in
|
// errMemorydbNotFound is returned if a key is requested that is not found in
|
||||||
// the provided memory database.
|
// the provided memory database.
|
||||||
errMemorydbNotFound = errors.New("not found")
|
errMemorydbNotFound = errors.New("not found")
|
||||||
|
|
||||||
// errSnapshotReleased is returned if callers want to retrieve data from a
|
|
||||||
// released snapshot.
|
|
||||||
errSnapshotReleased = errors.New("snapshot released")
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Database is an ephemeral key-value store. Apart from basic data storage
|
// Database is an ephemeral key-value store. Apart from basic data storage
|
||||||
|
|
@ -175,13 +171,6 @@ func (db *Database) NewIterator(prefix []byte, start []byte) ethdb.Iterator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewSnapshot creates a database snapshot based on the current state.
|
|
||||||
// The created snapshot will not be affected by all following mutations
|
|
||||||
// happened on the database.
|
|
||||||
func (db *Database) NewSnapshot() (ethdb.Snapshot, error) {
|
|
||||||
return newSnapshot(db), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Stat returns the statistic data of the database.
|
// Stat returns the statistic data of the database.
|
||||||
func (db *Database) Stat() (string, error) {
|
func (db *Database) Stat() (string, error) {
|
||||||
return "", nil
|
return "", nil
|
||||||
|
|
@ -332,59 +321,3 @@ func (it *iterator) Value() []byte {
|
||||||
func (it *iterator) Release() {
|
func (it *iterator) Release() {
|
||||||
it.index, it.keys, it.values = -1, nil, nil
|
it.index, it.keys, it.values = -1, nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// snapshot wraps a batch of key-value entries deep copied from the in-memory
|
|
||||||
// database for implementing the Snapshot interface.
|
|
||||||
type snapshot struct {
|
|
||||||
db map[string][]byte
|
|
||||||
lock sync.RWMutex
|
|
||||||
}
|
|
||||||
|
|
||||||
// newSnapshot initializes the snapshot with the given database instance.
|
|
||||||
func newSnapshot(db *Database) *snapshot {
|
|
||||||
db.lock.RLock()
|
|
||||||
defer db.lock.RUnlock()
|
|
||||||
|
|
||||||
copied := make(map[string][]byte, len(db.db))
|
|
||||||
for key, val := range db.db {
|
|
||||||
copied[key] = common.CopyBytes(val)
|
|
||||||
}
|
|
||||||
return &snapshot{db: copied}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Has retrieves if a key is present in the snapshot backing by a key-value
|
|
||||||
// data store.
|
|
||||||
func (snap *snapshot) Has(key []byte) (bool, error) {
|
|
||||||
snap.lock.RLock()
|
|
||||||
defer snap.lock.RUnlock()
|
|
||||||
|
|
||||||
if snap.db == nil {
|
|
||||||
return false, errSnapshotReleased
|
|
||||||
}
|
|
||||||
_, ok := snap.db[string(key)]
|
|
||||||
return ok, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get retrieves the given key if it's present in the snapshot backing by
|
|
||||||
// key-value data store.
|
|
||||||
func (snap *snapshot) Get(key []byte) ([]byte, error) {
|
|
||||||
snap.lock.RLock()
|
|
||||||
defer snap.lock.RUnlock()
|
|
||||||
|
|
||||||
if snap.db == nil {
|
|
||||||
return nil, errSnapshotReleased
|
|
||||||
}
|
|
||||||
if entry, ok := snap.db[string(key)]; ok {
|
|
||||||
return common.CopyBytes(entry), nil
|
|
||||||
}
|
|
||||||
return nil, errMemorydbNotFound
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release releases associated resources. Release should always succeed and can
|
|
||||||
// be called multiple times without causing error.
|
|
||||||
func (snap *snapshot) Release() {
|
|
||||||
snap.lock.Lock()
|
|
||||||
defer snap.lock.Unlock()
|
|
||||||
|
|
||||||
snap.db = nil
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -351,55 +351,6 @@ func (d *Database) NewBatchWithSize(size int) ethdb.Batch {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// snapshot wraps a pebble snapshot for implementing the Snapshot interface.
|
|
||||||
type snapshot struct {
|
|
||||||
db *pebble.Snapshot
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewSnapshot creates a database snapshot based on the current state.
|
|
||||||
// The created snapshot will not be affected by all following mutations
|
|
||||||
// happened on the database.
|
|
||||||
// Note don't forget to release the snapshot once it's used up, otherwise
|
|
||||||
// the stale data will never be cleaned up by the underlying compactor.
|
|
||||||
func (d *Database) NewSnapshot() (ethdb.Snapshot, error) {
|
|
||||||
snap := d.db.NewSnapshot()
|
|
||||||
return &snapshot{db: snap}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Has retrieves if a key is present in the snapshot backing by a key-value
|
|
||||||
// data store.
|
|
||||||
func (snap *snapshot) Has(key []byte) (bool, error) {
|
|
||||||
_, closer, err := snap.db.Get(key)
|
|
||||||
if err != nil {
|
|
||||||
if err != pebble.ErrNotFound {
|
|
||||||
return false, err
|
|
||||||
} else {
|
|
||||||
return false, nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
closer.Close()
|
|
||||||
return true, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get retrieves the given key if it's present in the snapshot backing by
|
|
||||||
// key-value data store.
|
|
||||||
func (snap *snapshot) Get(key []byte) ([]byte, error) {
|
|
||||||
dat, closer, err := snap.db.Get(key)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
ret := make([]byte, len(dat))
|
|
||||||
copy(ret, dat)
|
|
||||||
closer.Close()
|
|
||||||
return ret, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release releases associated resources. Release should always succeed and can
|
|
||||||
// be called multiple times without causing error.
|
|
||||||
func (snap *snapshot) Release() {
|
|
||||||
snap.db.Close()
|
|
||||||
}
|
|
||||||
|
|
||||||
// upperBound returns the upper bound for the given prefix
|
// upperBound returns the upper bound for the given prefix
|
||||||
func upperBound(prefix []byte) (limit []byte) {
|
func upperBound(prefix []byte) (limit []byte) {
|
||||||
for i := len(prefix) - 1; i >= 0; i-- {
|
for i := len(prefix) - 1; i >= 0; i-- {
|
||||||
|
|
|
||||||
|
|
@ -138,10 +138,6 @@ func (db *Database) Compact(start []byte, limit []byte) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *Database) NewSnapshot() (ethdb.Snapshot, error) {
|
|
||||||
panic("not supported")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (db *Database) Close() error {
|
func (db *Database) Close() error {
|
||||||
db.remote.Close()
|
db.remote.Close()
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
// Copyright 2022 The go-ethereum Authors
|
|
||||||
// This file is part of the go-ethereum library.
|
|
||||||
//
|
|
||||||
// The go-ethereum library is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// The go-ethereum library is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Lesser General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Lesser General Public License
|
|
||||||
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
package ethdb
|
|
||||||
|
|
||||||
type Snapshot interface {
|
|
||||||
// Has retrieves if a key is present in the snapshot backing by a key-value
|
|
||||||
// data store.
|
|
||||||
Has(key []byte) (bool, error)
|
|
||||||
|
|
||||||
// Get retrieves the given key if it's present in the snapshot backing by
|
|
||||||
// key-value data store.
|
|
||||||
Get(key []byte) ([]byte, error)
|
|
||||||
|
|
||||||
// Release releases associated resources. Release should always succeed and can
|
|
||||||
// be called multiple times without causing error.
|
|
||||||
Release()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Snapshotter wraps the Snapshot method of a backing data store.
|
|
||||||
type Snapshotter interface {
|
|
||||||
// NewSnapshot creates a database snapshot based on the current state.
|
|
||||||
// The created snapshot will not be affected by all following mutations
|
|
||||||
// happened on the database.
|
|
||||||
// Note don't forget to release the snapshot once it's used up, otherwise
|
|
||||||
// the stale data will never be cleaned up by the underlying compactor.
|
|
||||||
NewSnapshot() (Snapshot, error)
|
|
||||||
}
|
|
||||||
|
|
@ -819,7 +819,6 @@ func (s *spongeDb) Get(key []byte) ([]byte, error) { return nil, error
|
||||||
func (s *spongeDb) Delete(key []byte) error { panic("implement me") }
|
func (s *spongeDb) Delete(key []byte) error { panic("implement me") }
|
||||||
func (s *spongeDb) NewBatch() ethdb.Batch { return &spongeBatch{s} }
|
func (s *spongeDb) NewBatch() ethdb.Batch { return &spongeBatch{s} }
|
||||||
func (s *spongeDb) NewBatchWithSize(size int) ethdb.Batch { return &spongeBatch{s} }
|
func (s *spongeDb) NewBatchWithSize(size int) ethdb.Batch { return &spongeBatch{s} }
|
||||||
func (s *spongeDb) NewSnapshot() (ethdb.Snapshot, error) { panic("implement me") }
|
|
||||||
func (s *spongeDb) Stat() (string, error) { panic("implement me") }
|
func (s *spongeDb) Stat() (string, error) { panic("implement me") }
|
||||||
func (s *spongeDb) Compact(start []byte, limit []byte) error { panic("implement me") }
|
func (s *spongeDb) Compact(start []byte, limit []byte) error { panic("implement me") }
|
||||||
func (s *spongeDb) Close() error { return nil }
|
func (s *spongeDb) Close() error { return nil }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue