response cost

This commit is contained in:
Agnish Ghosh 2024-10-17 19:27:58 +05:30
parent a07ef5d654
commit 986e1f5d83
2 changed files with 4 additions and 3 deletions

View File

@ -712,8 +712,9 @@ proc syncWorker[A, B](man: SyncManager[A, B], index: int) {.async: (raises: [Can
await man.syncStep(index, peer) await man.syncStep(index, peer)
man.pool.release(peer) man.pool.release(peer)
peer = nil peer = nil
man.pool.release(peer) else:
peer = nil man.pool.release(peer)
peer = nil
finally: finally:
if not(isNil(peer)): if not(isNil(peer)):
man.pool.release(peer) man.pool.release(peer)

View File

@ -24,7 +24,7 @@ const
## Allow syncing ~64 blocks/sec (minus request costs) ## Allow syncing ~64 blocks/sec (minus request costs)
blobResponseCost = allowedOpsPerSecondCost(1000) blobResponseCost = allowedOpsPerSecondCost(1000)
## Multiple can exist per block, they are much smaller than blocks ## Multiple can exist per block, they are much smaller than blocks
dataColumnResponseCost = allowedOpsPerSecondCost(32000) dataColumnResponseCost = allowedOpsPerSecondCost(1000)
## 1 blob has an equivalent memory of 8 data columns ## 1 blob has an equivalent memory of 8 data columns
type type