Proper value for the HoldIdentifier::VARIANT_COUNT
#2674
Closed
Description
HoldIdentifier::VARIANT_COUNT
is used as the max number of holds an account can create, currently the following operation will create a hold on the caller account:
- Staking
- Nominate operator, a hold for the staking fund
- Withdraw staking, a hold for the withdrawal storage fund
- Open XDM channel, a hold for
ChannelReserveFee
- Instantiate domain, a hole for
DomainInstantiationDeposit
which means HoldIdentifier::VARIANT_COUNT
serves as a limit of the combination number of the above operation. After the limit is met any of the above operations will fail (i.e. an account can nominate but later fail to withdraw due to this limit).
Ideally, we should define limits for each of the above operations separately and set HoldIdentifier::VARIANT_COUNT
to Staking * 2 + OpenXDMChannel + InstantiateDomain
.
Metadata
Assignees
Labels
No labels