snet-cli icon indicating copy to clipboard operation
snet-cli copied to clipboard

use MPE.multiChannelClaim in 'snet treasurer claim-*'

Open astroseger opened this issue 7 years ago • 0 comments

In the current version we use MPE.channelClaim to claim funds. But we should use MPE.multiChannelClaim, which will allow claim many payments in one call. It will safe time and, maybe, gas.

There are two important points which should be taken into account:

  • We should be careful in order to not hit a gas limit. So we should tests which is a maximum number of payments in MPE.multiChannelClaim and split payments in appropriate batches.
  • We should carefully check that all payments are valid (we can simply call MPE.multiChannelClaim before actually transmitting it)

astroseger avatar Jan 14 '19 21:01 astroseger