darwinia-network / apps

Darwinia Apps
https://apps.darwinia.network
1 stars 5 forks source link

The active relayers number is incorrectly #314

Closed boundless-forest closed 2 years ago

boundless-forest commented 2 years ago

image

As the screenshot shows, the active relayers number is equal to the total relayers number. This is obviously incorrect.

image

The collateral of the relayers in the red box is 0(because of the slash), they are inactive.

The code to distinguish whether a relayer is active is https://github.com/darwinia-network/darwinia-messages-substrate/blob/main/modules/fee-market/src/lib.rs#L492-L504

We consider the relayer to be active only if the remaining locked collateral exceeds CollateralPerOrder except for the collateral occupied by the order being relayed.