No need to store repository handle in Block$ExpandedAccount

This commit is contained in:
catbref 2020-05-04 09:19:17 +01:00
parent 538e117abd
commit e2916b130b

View File

@ -128,8 +128,6 @@ public class Block {
/** Lazy-instantiated expanded info on block's online accounts. */ /** Lazy-instantiated expanded info on block's online accounts. */
static class ExpandedAccount { static class ExpandedAccount {
private final Repository repository;
private final RewardShareData rewardShareData; private final RewardShareData rewardShareData;
private final int sharePercent; private final int sharePercent;
private final boolean isRecipientAlsoMinter; private final boolean isRecipientAlsoMinter;
@ -143,7 +141,6 @@ public class Block {
private final boolean isRecipientFounder; private final boolean isRecipientFounder;
ExpandedAccount(Repository repository, int accountIndex) throws DataException { ExpandedAccount(Repository repository, int accountIndex) throws DataException {
this.repository = repository;
this.rewardShareData = repository.getAccountRepository().getRewardShareByIndex(accountIndex); this.rewardShareData = repository.getAccountRepository().getRewardShareByIndex(accountIndex);
this.sharePercent = this.rewardShareData.getSharePercent(); this.sharePercent = this.rewardShareData.getSharePercent();