mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 11:20:45 +00:00
remove old flags and add some comment docs
This commit is contained in:
parent
504bb79b7b
commit
98f4623942
2 changed files with 6 additions and 9 deletions
|
|
@ -1131,12 +1131,6 @@ Please note that --` + MetricsHTTPFlag.Name + ` must be set to start the server.
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
|
||||||
BalExecutionModeOptimized = "full"
|
|
||||||
BalExecutionModeNoBatchIO = "nobatchio"
|
|
||||||
BalExecutionModeSequential = "sequential"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// TestnetFlags is the flag group of all built-in supported testnets.
|
// TestnetFlags is the flag group of all built-in supported testnets.
|
||||||
TestnetFlags = []cli.Flag{
|
TestnetFlags = []cli.Flag{
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,8 @@ import (
|
||||||
"golang.org/x/sync/errgroup"
|
"golang.org/x/sync/errgroup"
|
||||||
)
|
)
|
||||||
|
|
||||||
// BALStateTransition is responsible for performing the state root update
|
// BALStateTransition computes the state root update and commits a single block
|
||||||
// and commit for EIP 7928 access-list-containing blocks. An instance of
|
// which contains an access list.
|
||||||
// this object is only used for a single block.
|
|
||||||
type BALStateTransition struct {
|
type BALStateTransition struct {
|
||||||
accessList *bal.AccessListReader
|
accessList *bal.AccessListReader
|
||||||
written bal.WrittenCounts
|
written bal.WrittenCounts
|
||||||
|
|
@ -54,6 +53,7 @@ type BALStateTransition struct {
|
||||||
err error
|
err error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Metrics returns metrics if Commit has previously been called.
|
||||||
func (s *BALStateTransition) Metrics() *BALStateTransitionMetrics {
|
func (s *BALStateTransition) Metrics() *BALStateTransitionMetrics {
|
||||||
return &s.metrics
|
return &s.metrics
|
||||||
}
|
}
|
||||||
|
|
@ -71,6 +71,7 @@ func (s *BALStateTransition) Deletions() DeletionCounts {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// BALStateTransitionMetrics contains metrics from a committed block.
|
||||||
type BALStateTransitionMetrics struct {
|
type BALStateTransitionMetrics struct {
|
||||||
// trie hashing metrics
|
// trie hashing metrics
|
||||||
AccountUpdate time.Duration
|
AccountUpdate time.Duration
|
||||||
|
|
@ -86,6 +87,7 @@ type BALStateTransitionMetrics struct {
|
||||||
TotalCommitTime time.Duration
|
TotalCommitTime time.Duration
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewBALStateTransition creates a BALStateTransition instance
|
||||||
func NewBALStateTransition(block *types.Block, prefetchReader Reader, db Database, parentRoot common.Hash, prepared *bal.AccessListReader) (*BALStateTransition, error) {
|
func NewBALStateTransition(block *types.Block, prefetchReader Reader, db Database, parentRoot common.Hash, prepared *bal.AccessListReader) (*BALStateTransition, error) {
|
||||||
stateTrie, err := db.OpenTrie(parentRoot)
|
stateTrie, err := db.OpenTrie(parentRoot)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -122,6 +124,7 @@ func (s *BALStateTransition) PreparedAccessList() *bal.AccessListReader {
|
||||||
return s.accessList
|
return s.accessList
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Error returns an error if IntermediateRoot or Commit failed.
|
||||||
func (s *BALStateTransition) Error() error {
|
func (s *BALStateTransition) Error() error {
|
||||||
return s.err
|
return s.err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue