Add context to transaction waiter #147
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-contract#147
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is your feature request related to a problem? Please describe.
Method Wait in commonclient.Waiter hangs up when discrete time of blockchain stops.
Describe the solution you'd like
To prevent hang up and to control duration of awaiting from application's side it would be nice to have a
WaitCtx
method that takes a context as a parameter. And canceling of the context stops transaction awaiting.Describe alternatives you've considered
Alternatively it would be possible to have a fixed timeout value in waiter options. However, fixed timeout is not flexible enough to control awaiting in different situations.
Also, it is possible to add context to existing method
Wait
. However, it would be preferred to preserve backward compatibility with the existing applications and just to add a new method next to the existing one.