Right now the polkadot-payouts tool doesn't scale very well. It iterates thru the blockchain for every single Stash address.
We should instead change the logic to iterate thru the blockchain and store all pending payouts in a Map[stash][num_pending_payouts] or so and then compare it to the configured addresses and claim for all of them. This should make execution time much faster.
Each loop opens it own connection to the Polkadot/Kusama API (should be opened/closed globally instead)
We still query the whole chain (or 28 last eras) for each validator address, would be better to query the chain once of all pending payouts and match the validator addresses to the list in the config instead. And then do a loop for the claims.
Right now the polkadot-payouts tool doesn't scale very well. It iterates thru the blockchain for every single Stash address.
We should instead change the logic to iterate thru the blockchain and store all pending payouts in a Map[stash][num_pending_payouts] or so and then compare it to the configured addresses and claim for all of them. This should make execution time much faster.
@ironoa FYI