[#120] Add waiter to frostfsid client #121

Merged
fyrchik merged 1 commit from vdomnich-yadro/frostfs-contract:vd/8357-add-tx-waiter into master 2024-10-22 12:09:22 +00:00
Member

Waiter provides a configurable behavior for awaiting transaction completion:

  • Whether "already exists" error should be ignored or not.
  • Whether transaction execution result should be examined to ensure that transaction entered block successfully (with the HALT status).
Waiter provides a configurable behavior for awaiting transaction completion: - Whether "already exists" error should be ignored or not. - Whether transaction execution result should be examined to ensure that transaction entered block successfully (with the HALT status).
vdomnich-yadro added 1 commit 2024-10-21 12:48:18 +00:00
[#120] Add waiter to frostfsid client
All checks were successful
DCO action / DCO (pull_request) Successful in 40s
Code generation / Generate wrappers (pull_request) Successful in 1m21s
Tests / Tests (pull_request) Successful in 1m28s
f7794b06f6
Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
vdomnich-yadro requested review from fyrchik 2024-10-21 12:48:42 +00:00
vdomnich-yadro requested review from alexvanin 2024-10-21 12:48:42 +00:00
vdomnich-yadro requested review from dkirillov 2024-10-21 12:48:42 +00:00
dkirillov reviewed 2024-10-22 08:12:55 +00:00
@ -0,0 +66,4 @@
// Waiting failed
if err != nil {
return result, err
Member

I would write

if err != nil {
		return nil, err
}

or

if !w.options.VerifyExecResults || err != nil {
		return result, err
}
I would write ```golang if err != nil { return nil, err } ``` or ```golang if !w.options.VerifyExecResults || err != nil { return result, err } ```
Author
Member

Fixed via the 2nd suggestion. Thanks!

Fixed via the 2nd suggestion. Thanks!
dkirillov marked this conversation as resolved
dkirillov reviewed 2024-10-22 08:15:41 +00:00
@ -151,17 +153,21 @@ func New(ra actor.RPCActor, acc *wallet.Account, contract util.Uint160, opt Opti
if err != nil {
return nil, fmt.Errorf("init actor: %w", err)
}
waiter := commonclient.NewWaiter(act, opt.Waiter)
Member

Can we choose other variable name to avoid collision with imported package name?

Can we choose other variable name to avoid collision with imported package name?
Author
Member

Fixed, thanks!

Fixed, thanks!
dkirillov marked this conversation as resolved
vdomnich-yadro requested review from storage-services-developers 2024-10-22 08:45:57 +00:00
vdomnich-yadro force-pushed vd/8357-add-tx-waiter from f7794b06f6 to 126d98d655 2024-10-22 08:49:11 +00:00 Compare
dkirillov reviewed 2024-10-22 09:17:35 +00:00
@ -161,2 +165,3 @@
// NewSimple creates a new Client using exising actor.Actor.
// NewSimple creates a new Client using existing actor.Actor and default waiter options.
func NewSimple(act *actor.Actor, contract util.Uint160) *Client {
waiter := commonclient.NewWaiter(act, commonclient.WaiterOptions{})
Member

The same 🙈 #121 (comment)

The same 🙈 https://git.frostfs.info/TrueCloudLab/frostfs-contract/pulls/121#issuecomment-55387
Author
Member

Oops, overlooked. Sorry! Fixed now)

Oops, overlooked. Sorry! Fixed now)
dkirillov marked this conversation as resolved
dkirillov approved these changes 2024-10-22 09:18:01 +00:00
Dismissed
vdomnich-yadro force-pushed vd/8357-add-tx-waiter from 126d98d655 to 5f956751d4 2024-10-22 09:41:06 +00:00 Compare
vdomnich-yadro dismissed dkirillov's review 2024-10-22 09:41:07 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

vdomnich-yadro requested review from dkirillov 2024-10-22 09:42:03 +00:00
alexvanin approved these changes 2024-10-22 10:17:04 +00:00
dkirillov approved these changes 2024-10-22 11:12:16 +00:00
achuprov approved these changes 2024-10-22 12:07:40 +00:00
fyrchik merged commit 5f956751d4 into master 2024-10-22 12:09:22 +00:00
vdomnich-yadro deleted branch vd/8357-add-tx-waiter 2024-10-22 12:18:44 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-services-developers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-contract#121
No description provided.