Documentation ¶
Index ¶
- Constants
- func FillAccountsWithOverlappingStorage(t *testing.T, trieDB *trie.Database, root common.Hash, numAccounts int, ...) (common.Hash, map[*keystore.Key]*types.StateAccount)
- 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 FillAccountsWithOverlappingStorage ¶
func FillAccountsWithOverlappingStorage( t *testing.T, trieDB *trie.Database, root common.Hash, numAccounts int, numOverlappingStorageRoots int, ) (common.Hash, map[*keystore.Key]*types.StateAccount)
FillAccountsWithOverlappingStorage adds [numAccounts] randomly generated accounts to the secure trie at [root] and commits it to [trieDB]. For each 3 accounts created: - One does not have a storage trie, - One has a storage trie shared with other accounts (total number of shared storage tries [numOverlappingStorageRoots]), - One has a uniquely generated storage trie, returns the new trie root and a map of funded keys to StateAccount structs.
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
Click to show internal directories.
Click to hide internal directories.