diff options
author | Stephen Buttolph <[email protected]> | 2020-04-16 01:02:16 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-16 01:02:16 -0400 |
commit | 6ac9ecf8a736e06a5dba6b971e632342fe6eef66 (patch) | |
tree | 2c8314f1c69b9afaf30e71a887cd9734fceb0023 /plugin/evm/database.go | |
parent | ae13dfb64a82d35d6c9607bc61dcf1ac21e59f85 (diff) |
Revert "Added the EVM as a plugin"
Diffstat (limited to 'plugin/evm/database.go')
-rw-r--r-- | plugin/evm/database.go | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/plugin/evm/database.go b/plugin/evm/database.go deleted file mode 100644 index de592e1..0000000 --- a/plugin/evm/database.go +++ /dev/null @@ -1,66 +0,0 @@ -// (c) 2019-2020, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package evm - -import ( - "errors" - - "github.com/ava-labs/go-ethereum/ethdb" - - "github.com/ava-labs/gecko/database" -) - -var ( - errOpNotSupported = errors.New("this operation is not supported") -) - -// Database implements ethdb.Database -type Database struct{ database.Database } - -// HasAncient returns an error as we don't have a backing chain freezer. -func (db Database) HasAncient(kind string, number uint64) (bool, error) { - return false, errOpNotSupported -} - -// Ancient returns an error as we don't have a backing chain freezer. -func (db Database) Ancient(kind string, number uint64) ([]byte, error) { return nil, errOpNotSupported } - -// Ancients returns an error as we don't have a backing chain freezer. -func (db Database) Ancients() (uint64, error) { return 0, errOpNotSupported } - -// AncientSize returns an error as we don't have a backing chain freezer. -func (db Database) AncientSize(kind string) (uint64, error) { return 0, errOpNotSupported } - -// AppendAncient returns an error as we don't have a backing chain freezer. -func (db Database) AppendAncient(number uint64, hash, header, body, receipts, td []byte) error { - return errOpNotSupported -} - -// TruncateAncients returns an error as we don't have a backing chain freezer. -func (db Database) TruncateAncients(items uint64) error { return errOpNotSupported } - -// Sync returns an error as we don't have a backing chain freezer. -func (db Database) Sync() error { return errOpNotSupported } - -// NewBatch implements ethdb.Database -func (db Database) NewBatch() ethdb.Batch { return Batch{db.Database.NewBatch()} } - -// NewIterator implements ethdb.Database -func (db Database) NewIterator() ethdb.Iterator { return db.Database.NewIterator() } - -// NewIteratorWithPrefix implements ethdb.Database -func (db Database) NewIteratorWithPrefix(prefix []byte) ethdb.Iterator { - return db.NewIteratorWithPrefix(prefix) -} - -// NewIteratorWithStart implements ethdb.Database -func (db Database) NewIteratorWithStart(start []byte) ethdb.Iterator { - return db.NewIteratorWithStart(start) -} - -// Batch implements ethdb.Batch -type Batch struct{ database.Batch } - -// Replay implements ethdb.Batch -func (batch Batch) Replay(w ethdb.KeyValueWriter) error { return batch.Batch.Replay(w) } |