mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-11 01:11:37 +00:00
core: fixed costPerStateByte
This commit is contained in:
parent
e5064680b3
commit
856fd974f6
1 changed files with 9 additions and 0 deletions
|
|
@ -83,6 +83,15 @@ func NewEVMBlockContext(header *types.Header, chain ChainContext, author *common
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CostPerStateByte computes the cost per one byte of state creation
|
||||||
|
// after EIP-8037.
|
||||||
|
func CostPerStateByte(header *types.Header, config *params.ChainConfig) uint64 {
|
||||||
|
if !config.IsAmsterdam(header.Number, header.Time) {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return 1174 // Fixed cost for devnet-4
|
||||||
|
}
|
||||||
|
|
||||||
// NewEVMTxContext creates a new transaction context for a single transaction.
|
// NewEVMTxContext creates a new transaction context for a single transaction.
|
||||||
func NewEVMTxContext(msg *Message) vm.TxContext {
|
func NewEVMTxContext(msg *Message) vm.TxContext {
|
||||||
ctx := vm.TxContext{
|
ctx := vm.TxContext{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue