While the invariant functionality in the multisig struct offers comprehensive coverage of state management, we're adding an additional check in the multisig_add_member functionality to explicitly check for duplicates. This helps insure that the member key must be removed before re-added (in the case of changing permissions for example), as the invariant check is not able to distinguish which key should be removed upon upon the invariant check.
While the invariant functionality in the multisig struct offers comprehensive coverage of state management, we're adding an additional check in the multisig_add_member functionality to explicitly check for duplicates. This helps insure that the member key must be removed before re-added (in the case of changing permissions for example), as the invariant check is not able to distinguish which key should be removed upon upon the invariant check.