The expected count of index files should be counted based on the already
uploaded object number.
Close#3669
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Will be reverted when nspcc-dev/neofs-node#2988 is fixed. Currently HEAD
request can return incorrect attributes, which can lead to incorrect
index files.
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
In case of incomplete search result it will try to find each missed oid
and process it. In case of duplicates the first found will be in index
file.
Close#3647
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Verify that there are no empty OIDs in the constructed index file, as
empty payloads can result in improperly set attributes, leading to empty
OIDs being added to the index file.
Close#3628
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
In case of uploading retry already drained bin buffer is returned in
`bw.Bytes`, which leads to empty block uploading.
Close#3630
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Miscalculation leads to negative values in errors:
```
2024-10-17 11:26:56.790 failed to fetch the latest missing block index
from container: search of index files failed for batch with indexes
from -260000 to -250000: error during object IDs iteration: context
deadline exceeded
```
Close#3621
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Always return "Target transaction accepted" error if the target transation was
either accepted by the moment of command run or during the command
handling. Exit with code 1 in both cases. Adjust TestAwaitUtilCancelTx
correspondingly, allow both cases in test. Simplify the test along the
way, remove useless code.
Close#3365.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
Occasionally the block is being accepted right after main transaction
submission. Added two branches into this TestAwaitUtilCancelTx. One
branch handles the case of original transaction acceptance, the
other branch handles the conflicting transaction acceptance.
Close#3365
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
New --await flag is an option to synchronize on transaction execution
for CLI commands.
Closes#3244
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
If main transaction is known, then conflicting transaction shouldn't be
valid longer than the main one.
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Move actor handling into CLI package.
GetRPCWithActor returns RPC with actor instances.
Close#2682.
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Move GetAccFromContext, GetUnlockedAccount, ReadWalletConfig handling
into options package to reuse this code from all CLI handlers.
getDecryptedAccount is replaced by GetUnlockedAccount.
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
CLI side method for canceling not yet accepted transaction. It's
alternative to unsupported `canceltransaction` RPC method.
Close#3151.
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Refs. #2379, but not completely solves it, one package seriously outweights
others:
? github.com/nspcc-dev/neo-go/cli [no test files]
ok github.com/nspcc-dev/neo-go/cli/app 0.036s coverage: 100.0% of statements
ok github.com/nspcc-dev/neo-go/cli/cmdargs 0.011s coverage: 60.8% of statements
ok github.com/nspcc-dev/neo-go/cli/flags 0.009s coverage: 97.7% of statements
? github.com/nspcc-dev/neo-go/cli/input [no test files]
ok github.com/nspcc-dev/neo-go/cli/options 0.033s coverage: 50.0% of statements
? github.com/nspcc-dev/neo-go/cli/paramcontext [no test files]
ok github.com/nspcc-dev/neo-go/cli/query 2.155s coverage: 45.3% of statements
ok github.com/nspcc-dev/neo-go/cli/server 1.373s coverage: 67.8% of statements
ok github.com/nspcc-dev/neo-go/cli/smartcontract 8.819s coverage: 94.3% of statements
ok github.com/nspcc-dev/neo-go/cli/util 0.006s coverage: 10.9% of statements
? github.com/nspcc-dev/neo-go/cli/vm [no test files]
ok github.com/nspcc-dev/neo-go/cli/wallet 72.103s coverage: 88.2% of statements
Still a nice thing to have.
Some commands don't accept arguments, but users try giving them and don't
notice a mistake. It's a bit more user-friendly to tell the user that there is
something wrong with the way he tries to use the command.