[#1522] adm/frostfsid: Remove unreachable condition
All checks were successful
DCO action / DCO (pull_request) Successful in 1m44s
Vulncheck / Vulncheck (pull_request) Successful in 3m39s
Build / Build Components (pull_request) Successful in 4m17s
Pre-commit hooks / Pre-commit (pull_request) Successful in 4m22s
Tests and linters / Run gofumpt (pull_request) Successful in 4m38s
Tests and linters / gopls check (pull_request) Successful in 5m26s
Tests and linters / Staticcheck (pull_request) Successful in 5m46s
Tests and linters / Tests with -race (pull_request) Successful in 5m46s
Tests and linters / Lint (pull_request) Successful in 6m58s
Tests and linters / Tests (pull_request) Successful in 8m38s

SendConsensusTx() modifies SendTxs field, if it is not the case, there
is a bug in code.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-11-22 13:19:58 +03:00
parent 8ccbf5a23a
commit 0f3ed39bf9
Signed by: fyrchik
SSH key fingerprint: SHA256:m/TTwCzjnRkXgnzEx9X92ccxy1CcVeinOgDb3NPWWmg

View file

@ -1,7 +1,6 @@
package frostfsid
import (
"errors"
"fmt"
"math/big"
"sort"
@ -489,10 +488,6 @@ func (f *frostfsidClient) sendWaitRes() (*state.AppExecResult, error) {
}
f.bw.Reset()
if len(f.wCtx.SentTxs) == 0 {
return nil, errors.New("no transactions to wait")
}
f.wCtx.Command.Println("Waiting for transactions to persist...")
return f.roCli.Wait(f.wCtx.SentTxs[0].Hash, f.wCtx.SentTxs[0].Vub, nil)
}