mirror of
https://github.com/luxfi/evm.git
synced 2026-09-24 00:27:44 +00:00
* apply diff to rc0 * replace coreth with subnet-evm * go mod tidy * remove must commit * remove apricots * replace coreth with subnet-evm * rename banff and cortina * test memory db * add dUpgrade * fix errors * sync with v0.12.4-rc0 * more diffs * change templates * readd preparePredicateSlots * run goimports * readd tx allow list check to txpool * Fix tests * readd subnet evm check for tests * fix tests * add gas limit & coinbase fakers * Fix timestamp types * check error from newblockchain * fix gas limit in simulated genesis * downgrade ci to go 1.19 * gofmt files * rebump go to 1.20 * bump anr to latest * bump anr to latest * prepare predicate storage slots in Subnet-EVM * uncomment tests * change order of airdrop memory cleanup * add utils import * Coreth 0.12.4 x apply (#720) Co-authored-by: Darioush Jalali <[email protected]> * move instruction sets * revert unpack changes * reduce diffs * move genesis verify to vm (#753) * move genesis verify to vm * fix comment * set a correct default from genesis * fix log * revert change to vm.go --------- Co-authored-by: Darioush Jalali <[email protected]> * avoid adding/removing GasLimits in tests (#755) * move genesis verify to vm * fix comment * set a correct default from genesis * fix log * revert change to vm.go * avoid adding/removing GasLimits in tests * nit --------- Co-authored-by: Ceyhun Onur <[email protected]> --------- Co-authored-by: Darioush Jalali <[email protected]>
42 lines
1.7 KiB
Go
42 lines
1.7 KiB
Go
// 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)
|
|
}
|