Documentation
¶
Index ¶
- Constants
- func NewMainTrieTask(sync *stateSync) syncTask
- func NewStateSyncer(config *StateSyncerConfig) (*stateSync, error)
- func NewStorageTrieTask(sync *stateSync, root common.Hash, accounts []common.Hash) syncTask
- func NewTrieQueue(db ethdb.Database) *trieQueue
- func NewTrieToSync(sync *stateSync, root common.Hash, account common.Hash, syncTask syncTask) (*trieToSync, error)
- type CodeSyncerConfig
- type StateSyncerConfig
Constants ¶
View Source
const ( DefaultMaxOutstandingCodeHashes = 5000 DefaultNumCodeFetchingWorkers = 5 )
Variables ¶
This section is empty.
Functions ¶
func NewMainTrieTask ¶
func NewMainTrieTask(sync *stateSync) syncTask
func NewStateSyncer ¶
func NewStateSyncer(config *StateSyncerConfig) (*stateSync, error)
func NewStorageTrieTask ¶
func NewTrieQueue ¶
Types ¶
type CodeSyncerConfig ¶
type CodeSyncerConfig struct {
// Maximum number of outstanding code hashes in the queue before the code syncer should block.
MaxOutstandingCodeHashes int
// Number of worker threads to fetch code from the network
NumCodeFetchingWorkers int
// Client for fetching code from the network
Client statesyncclient.Client
// Database for the code syncer to use.
DB ethdb.Database
}
CodeSyncerConfig defines the configuration of the code syncer
type StateSyncerConfig ¶
type StateSyncerConfig struct {
Root common.Hash
Client syncclient.Client
DB ethdb.Database
BatchSize int
MaxOutstandingCodeHashes int // Maximum number of code hashes in the code syncer queue
NumCodeFetchingWorkers int // Number of code syncing threads
RequestSize uint16 // Number of leafs to request from a peer at a time
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.