Commit graph

3 commits

Author SHA1 Message Date
Anna Shaleva
f5b1bd3978 waiter: adopt headers subscription for WS-based tx awaiting
Try to subscribe for headers firstly, and then if RPC server doesn't
have this ability, fallback to block subscriptions to manage transaction
awaiting.

Close #3260.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-12-29 16:00:56 +03:00
Anna Shaleva
7c9b1d05d2 rpcclient: refactor waiter package naming
Adjust names of all used structures, no need to duplicate `Waiter` everywhere,
we already in the `waiter` package. Also, adjust comments to Actor so that links
to Waiter are properly described in docs.

Ref. #3265.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-12-29 15:22:50 +03:00
Ekaterina Pavlova
4c6dca876c rpcclient: move Waiter to a separate package
There are use-cases when not only Actor, but also Invoker and even
simple RPC client must wait (e.g. sendtx or dumptx CLI commands). Actor
requires optional signers in constructor, and it's not always
appropriate to create Actor only to be able to use Waiter, sometimes
it's needed to use only Waiter without Actor.

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2023-12-28 15:30:15 +03:00