substrate-debug-kit
substrate-debug-kit copied to clipboard
offline-election block in get_candidates and then loop print ws closed error
run this command
run --package offline-election --bin offline-election -- --uri wss://cc1.darwinia.network --network darwinia staking
and blocked here for 10 secs and then loop print error as following
[2020-12-03T08:53:48Z ERROR] Client Error: Inner(Ws(Closed))
[2020-12-03T08:53:48Z ERROR] Client Error: Inner(Ws(Closed))
....
notice issue and seems similar
@AurevoirXavier @HackFisher
will this hack work?
https://github.com/darwinia-network/bridger/commit/d70d76ce5f26fd0d7baaa6f06ff3f5163556f0ed
Yes, works. But that hack kind dirty & ugly.
@AurevoirXavier
notice that this lib use state_getPairs
to get all validators https://github.com/paritytech/substrate-debug-kit/blob/22f804bbdbaa3c7068baf33e950bbcf0e04f3d90/offline-election/src/subcommands/staking.rs#L37 and take too long to timeout, will it better to use state_getKeysPaged
instead?