forked from TrueCloudLab/frostfs-node
Revert "[#972] Use min/max builtins"
This reverts commit 89784b2e0a
.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
4bfc6d29b9
commit
dad56d2e98
10 changed files with 53 additions and 11 deletions
|
@ -100,7 +100,10 @@ func registerCandidates(c *helper.InitializeContext) error {
|
|||
// Register candidates in batches in order to overcome the signers amount limit.
|
||||
// See: https://github.com/nspcc-dev/neo-go/blob/master/pkg/core/transaction/transaction.go#L27
|
||||
for i := 0; i < need; i += registerBatchSize {
|
||||
start, end := i, min(i+registerBatchSize, need)
|
||||
start, end := i, i+registerBatchSize
|
||||
if end > need {
|
||||
end = need
|
||||
}
|
||||
// This check is sound because transactions are accepted/rejected atomically.
|
||||
if have >= end {
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue