mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 13:21:37 +00:00
parent
a9be217e6e
commit
df8c94ce5b
6 changed files with 6 additions and 6 deletions
|
|
@ -26,7 +26,7 @@ import (
|
|||
"github.com/XinFinOrg/XDPoSChain/trie"
|
||||
)
|
||||
|
||||
// NewStateSync create a new state trie download scheduler.
|
||||
// NewStateSync creates a new state trie download scheduler.
|
||||
func NewStateSync(root common.Hash, database ethdb.KeyValueReader, onLeaf func(keys [][]byte, leaf []byte) error, scheme string) *trie.Sync {
|
||||
// Register the storage slot callback if the external callback is specified.
|
||||
var onSlot func(keys [][]byte, path []byte, leaf []byte, parent common.Hash, parentPath []byte) error
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ func (result *ExecutionResult) Revert() []byte {
|
|||
}
|
||||
|
||||
// IntrinsicGas computes the 'intrinsic gas' for a message with the given data.
|
||||
func IntrinsicGas(data []byte, accessList types.AccessList, authList []types.SetCodeAuthorization, isContractCreation, isHomestead bool, isEIP3860 bool) (uint64, error) {
|
||||
func IntrinsicGas(data []byte, accessList types.AccessList, authList []types.SetCodeAuthorization, isContractCreation, isHomestead, isEIP3860 bool) (uint64, error) {
|
||||
// Set the starting gas for the raw transaction
|
||||
var gas uint64
|
||||
if isContractCreation && isHomestead {
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ func (pool *LegacyPool) Init(gasTip uint64, head *types.Header, reserver *txpool
|
|||
pool.gasTip.Store(uint256.NewInt(gasTip))
|
||||
|
||||
// Initialize the state with head block, or fallback to empty one in
|
||||
// case the head state is not available(might occur when node is not
|
||||
// case the head state is not available (might occur when node is not
|
||||
// fully synced).
|
||||
statedb, err := pool.chain.StateAt(head.Root)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ type list struct {
|
|||
totalcost *uint256.Int // Total cost of all transactions in the list
|
||||
}
|
||||
|
||||
// newList create a new transaction list for maintaining nonce-indexable fast,
|
||||
// newList creates a new transaction list for maintaining nonce-indexable fast,
|
||||
// gapped, sortable transaction lists.
|
||||
func newList(strict bool) *list {
|
||||
return &list{
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ type MinerAPI struct {
|
|||
agent *miner.RemoteAgent
|
||||
}
|
||||
|
||||
// NewMinerAPI create a new RPC service which controls the miner of this node.
|
||||
// NewMinerAPI creates a new RPC service which controls the miner of this node.
|
||||
func NewMinerAPI(e *Ethereum) *MinerAPI {
|
||||
agent := miner.NewRemoteAgent(e.BlockChain(), e.Engine())
|
||||
e.Miner().Register(agent)
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ type DownloaderAPI struct {
|
|||
uninstallSyncSubscription chan *uninstallSyncSubscriptionRequest
|
||||
}
|
||||
|
||||
// NewDownloaderAPI create a new DownloaderAPI. The API has an internal event loop that
|
||||
// NewDownloaderAPI creates a new DownloaderAPI. The API has an internal event loop that
|
||||
// listens for events from the downloader through the global event mux. In case it receives one of
|
||||
// these events it broadcasts it to all syncing subscriptions that are installed through the
|
||||
// installSyncSubscription channel.
|
||||
|
|
|
|||
Loading…
Reference in a new issue