mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 10:20:44 +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"
|
"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 {
|
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.
|
// 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
|
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.
|
// 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
|
// Set the starting gas for the raw transaction
|
||||||
var gas uint64
|
var gas uint64
|
||||||
if isContractCreation && isHomestead {
|
if isContractCreation && isHomestead {
|
||||||
|
|
|
||||||
|
|
@ -343,7 +343,7 @@ func (pool *LegacyPool) Init(gasTip uint64, head *types.Header, reserver *txpool
|
||||||
pool.gasTip.Store(uint256.NewInt(gasTip))
|
pool.gasTip.Store(uint256.NewInt(gasTip))
|
||||||
|
|
||||||
// Initialize the state with head block, or fallback to empty one in
|
// 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).
|
// fully synced).
|
||||||
statedb, err := pool.chain.StateAt(head.Root)
|
statedb, err := pool.chain.StateAt(head.Root)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -279,7 +279,7 @@ type list struct {
|
||||||
totalcost *uint256.Int // Total cost of all transactions in the list
|
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.
|
// gapped, sortable transaction lists.
|
||||||
func newList(strict bool) *list {
|
func newList(strict bool) *list {
|
||||||
return &list{
|
return &list{
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ type MinerAPI struct {
|
||||||
agent *miner.RemoteAgent
|
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 {
|
func NewMinerAPI(e *Ethereum) *MinerAPI {
|
||||||
agent := miner.NewRemoteAgent(e.BlockChain(), e.Engine())
|
agent := miner.NewRemoteAgent(e.BlockChain(), e.Engine())
|
||||||
e.Miner().Register(agent)
|
e.Miner().Register(agent)
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ type DownloaderAPI struct {
|
||||||
uninstallSyncSubscription chan *uninstallSyncSubscriptionRequest
|
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
|
// 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
|
// these events it broadcasts it to all syncing subscriptions that are installed through the
|
||||||
// installSyncSubscription channel.
|
// installSyncSubscription channel.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue