Return REWARD_SHARE_UNKNOWN when trying to cancel non-existent reward-share

This commit is contained in:
catbref 2020-07-14 09:53:14 +01:00
parent d81729d9f7
commit 275146fb55
2 changed files with 2 additions and 1 deletions

View File

@ -136,7 +136,7 @@ public class RewardShareTransaction extends Transaction {
// Deleting a non-existent reward-share makes no sense // Deleting a non-existent reward-share makes no sense
if (isCancellingSharePercent) if (isCancellingSharePercent)
return ValidationResult.INVALID_REWARD_SHARE_PERCENT; return ValidationResult.REWARD_SHARE_UNKNOWN;
// Check the minting account hasn't reach maximum number of reward-shares // Check the minting account hasn't reach maximum number of reward-shares
int rewardShareCount = this.repository.getAccountRepository().countRewardShares(creator.getPublicKey()); int rewardShareCount = this.repository.getAccountRepository().countRewardShares(creator.getPublicKey());

View File

@ -225,6 +225,7 @@ public abstract class Transaction {
AT_IS_FINISHED(71), AT_IS_FINISHED(71),
NO_FLAG_PERMISSION(72), NO_FLAG_PERMISSION(72),
NOT_MINTING_ACCOUNT(73), NOT_MINTING_ACCOUNT(73),
REWARD_SHARE_UNKNOWN(76),
INVALID_REWARD_SHARE_PERCENT(77), INVALID_REWARD_SHARE_PERCENT(77),
PUBLIC_KEY_UNKNOWN(78), PUBLIC_KEY_UNKNOWN(78),
INVALID_PUBLIC_KEY(79), INVALID_PUBLIC_KEY(79),