mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-05 23:13:09 +00:00
Add blockRetries parameter
This commit is contained in:
parent
0e318385c3
commit
d3d2347e8f
@ -326,7 +326,7 @@ proc new*(
|
|||||||
)
|
)
|
||||||
|
|
||||||
peerStore = PeerCtxStore.new()
|
peerStore = PeerCtxStore.new()
|
||||||
pendingBlocks = PendingBlocksManager.new()
|
pendingBlocks = PendingBlocksManager.new(retries = config.blockRetries)
|
||||||
advertiser = Advertiser.new(repoStore, discovery)
|
advertiser = Advertiser.new(repoStore, discovery)
|
||||||
blockDiscovery =
|
blockDiscovery =
|
||||||
DiscoveryEngine.new(repoStore, peerStore, network, discovery, pendingBlocks)
|
DiscoveryEngine.new(repoStore, peerStore, network, discovery, pendingBlocks)
|
||||||
|
|||||||
@ -47,13 +47,14 @@ import ./utils/natutils
|
|||||||
|
|
||||||
from ./contracts/config import DefaultRequestCacheSize, DefaultMaxPriorityFeePerGas
|
from ./contracts/config import DefaultRequestCacheSize, DefaultMaxPriorityFeePerGas
|
||||||
from ./validationconfig import MaxSlots, ValidationGroups
|
from ./validationconfig import MaxSlots, ValidationGroups
|
||||||
|
from ./blockexchange/engine/pendingblocks import DefaultBlockRetries
|
||||||
|
|
||||||
export units, net, codextypes, logutils, completeCmdArg, parseCmdArg, NatConfig
|
export units, net, codextypes, logutils, completeCmdArg, parseCmdArg, NatConfig
|
||||||
export ValidationGroups, MaxSlots
|
export ValidationGroups, MaxSlots
|
||||||
|
|
||||||
export
|
export
|
||||||
DefaultQuotaBytes, DefaultBlockTtl, DefaultBlockInterval, DefaultNumBlocksPerInterval,
|
DefaultQuotaBytes, DefaultBlockTtl, DefaultBlockInterval, DefaultNumBlocksPerInterval,
|
||||||
DefaultRequestCacheSize, DefaultMaxPriorityFeePerGas
|
DefaultRequestCacheSize, DefaultMaxPriorityFeePerGas, DefaultBlockRetries
|
||||||
|
|
||||||
type ThreadCount* = distinct Natural
|
type ThreadCount* = distinct Natural
|
||||||
|
|
||||||
@ -264,6 +265,13 @@ type
|
|||||||
name: "block-mn"
|
name: "block-mn"
|
||||||
.}: int
|
.}: int
|
||||||
|
|
||||||
|
blockRetries* {.
|
||||||
|
desc: "Number of times to retry fetching a block before giving up",
|
||||||
|
defaultValue: DefaultBlockRetries,
|
||||||
|
defaultValueDesc: $DefaultBlockRetries,
|
||||||
|
name: "block-retries"
|
||||||
|
.}: int
|
||||||
|
|
||||||
cacheSize* {.
|
cacheSize* {.
|
||||||
desc:
|
desc:
|
||||||
"The size of the block cache, 0 disables the cache - " &
|
"The size of the block cache, 0 disables the cache - " &
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user