Commit 5c17e86
shim: refactor the sugondat rpc client
This changeset makes a couple of fixes and changes:
1. Now the client strives to provide a peristent connection. See thrumdev#68.
1. Fix the greedy polling (See thrumdev#37). Now, only a single task polls for the
finalized header.
1. Extracts the timestamp from the extrinsics instead of getting it from the storage.
1. Also sprinkles more documentation, clarifies some assumptions.
1. Now checks whether the subxt codegen matches the runtime metadata. If not, then
we assume that the node is still useable, but still warn the user.
1. If the RPC node is not available, instead of bailing out, we
keep reconnecting. I imagine this should be useful in cases where we spin up
a local network and the shim started up before the sugondat node (plausible IMO).
Closes thrumdev#68
Closes thrumdev#56
Closes thrumdev#371 parent 8c884c7 commit 5c17e86
File tree
6 files changed
+432
-75
lines changed- sugondat-shim
- src
- dock
- sugondat-subxt/src
6 files changed
+432
-75
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
0 commit comments