If `config-path` is not passed, default configs are used according to
the set network. In VM CLI the default privnet config with InMemory db
is used.
Close#3450Close#3459
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Do not use the updated contract state from native Management to perform
permissions checks. We need to use the currently executing state
instead got from the currently executing VM context until context is
unloaded.
Close#3471.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
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>
To prevent `Expired transaction (-510) - transaction has expired:
ValidUntilBlock = 8, current height = 8` VUB have been increased.
Close#3343
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
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>
And refactor some code a bit, don't use bytes.Clone where type-specific
helpers may be used instead.
Close#2907.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
Revert 5f6c01336c, remove all multierror
related nolint comments and use multierror wrapping instead.
Close#2906.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
`wallet1_solo.json` can't be used in this test because it contains
committee member that receives reward for accepted blocks. The race in
this test happens due to the fact that it uses running blockchain and
checks expected GAS balance via call to blockchain's
GetUtilityTokenBalance API. This call is racy with the CLI command
executed prior to the call which causes the following test failure:
```
2023-04-06T08:44:08.6038406Z === NAME TestNEP17Balance/all_accounts
2023-04-06T08:44:08.6038738Z executor.go:240:
2023-04-06T08:44:08.6039454Z Error Trace: /opt/github-runner/_work/neo-go/neo-go/cli/nep_test/executor.go:240
2023-04-06T08:44:08.6040628Z /opt/github-runner/_work/neo-go/neo-go/cli/nep_test/executor.go:236
2023-04-06T08:44:08.6041787Z /opt/github-runner/_work/neo-go/neo-go/cli/nep_test/nep17_test.go:73
2023-04-06T08:44:08.6042389Z Error: Expect " Amount : 1" to match "^\s*Amount\s*:\s*1.5$"
2023-04-06T08:44:08.6042865Z Test: TestNEP17Balance/all_accounts
```
The fix is do not use committee accounts for balance checks. Let's use
side accounts and transfer funds to some of them before the test start.
Close#2960.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
It contains several simple signature accounts that are not related to
network committee or validators. Needed for tests, existing
`testwallet.json` can't de reused since some tests need testing wallet
with a single account.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
Previously user should Start server in a separate goroutine. Now
separate goroutine is created inside the Start(). For normal server
operation, the caller should wait for Start to finish. Also, fixed
TestTryInitStateSync test which was exiting earlier than logs are
called.
Close#3112
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Add exit function at the end of the test to prevent
errors in t.Cleanup of the t.TempDir for levelDB instance.
Close#3154
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Needs to updated dependencies inside the test for go1.18 and higher to
match with interop module.
Close#3152
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Fix VM test for windows. We don't have notary enabled in unit testchains
so it was removed.
Close#3309
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
We have a full list of public keys in the import-multisig command, so if
we have a key in the wallet that corresponds to one of these keys
(simple sig), just reuse it for the account automatically
Closes#3266
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Autogenerated RPC wrapper used underscores to differentiate between
methods/event overloads. Now it adds increasing suffices instead.
Close#3296
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>
The text must appear as the first line of a properly formatted Go //
comment, and that comment must appear before but not be attached to the
package clause and before any /* */ comment.
Closes#3254
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
No functional changes.
We have 2 exactly the same cycles,and in the 1st cycle we set
cosignersOffset to the right value. So we don't need to check for arg ==
cmdargs.CosignersSeparator one more time.
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>