mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 03:10:48 +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 (
|
||||
// TestnetFlags is the flag group of all built-in supported testnets.
|
||||
TestnetFlags = []cli.Flag{
|
||||
|
|
|
|||
|
|
@ -15,9 +15,8 @@ import (
|
|||
"golang.org/x/sync/errgroup"
|
||||
)
|
||||
|
||||
// BALStateTransition is responsible for performing the state root update
|
||||
// and commit for EIP 7928 access-list-containing blocks. An instance of
|
||||
// this object is only used for a single block.
|
||||
// BALStateTransition computes the state root update and commits a single block
|
||||
// which contains an access list.
|
||||
type BALStateTransition struct {
|
||||
accessList *bal.AccessListReader
|
||||
written bal.WrittenCounts
|
||||
|
|
@ -54,6 +53,7 @@ type BALStateTransition struct {
|
|||
err error
|
||||
}
|
||||
|
||||
// Metrics returns metrics if Commit has previously been called.
|
||||
func (s *BALStateTransition) Metrics() *BALStateTransitionMetrics {
|
||||
return &s.metrics
|
||||
}
|
||||
|
|
@ -71,6 +71,7 @@ func (s *BALStateTransition) Deletions() DeletionCounts {
|
|||
}
|
||||
}
|
||||
|
||||
// BALStateTransitionMetrics contains metrics from a committed block.
|
||||
type BALStateTransitionMetrics struct {
|
||||
// trie hashing metrics
|
||||
AccountUpdate time.Duration
|
||||
|
|
@ -86,6 +87,7 @@ type BALStateTransitionMetrics struct {
|
|||
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) {
|
||||
stateTrie, err := db.OpenTrie(parentRoot)
|
||||
if err != nil {
|
||||
|
|
@ -122,6 +124,7 @@ func (s *BALStateTransition) PreparedAccessList() *bal.AccessListReader {
|
|||
return s.accessList
|
||||
}
|
||||
|
||||
// Error returns an error if IntermediateRoot or Commit failed.
|
||||
func (s *BALStateTransition) Error() error {
|
||||
return s.err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue