Skip to content

Commit

Permalink
Add voting power, award to chaininfo
Browse files Browse the repository at this point in the history
  • Loading branch information
acktsap committed Nov 27, 2019
1 parent 915b723 commit d8d03aa
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.junit.Before;
import org.junit.Test;

public class SmartContractIT extends AbstractIT {
public class ContractApiIT extends AbstractIT {

protected WalletApi walletApi;

Expand Down
17 changes: 12 additions & 5 deletions core/common/src/main/java/hera/api/model/ChainInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,29 @@ public class ChainInfo {

@NonNull
@Default
Aer totalTokenAmount = Aer.EMPTY;
Aer totalTokenAmount = Aer.ZERO;

@NonNull
@Default
Aer minimumStakingAmount = Aer.EMPTY;
Aer minimumStakingAmount = Aer.ZERO;

@NonNull
@Default
Aer totalStaked = Aer.EMPTY;
Aer totalStaked = Aer.ZERO;

@NonNull
@Default
Aer gasPrice = Aer.EMPTY;
Aer gasPrice = Aer.ZERO;

@NonNull
@Default
Aer namingPrice = Aer.EMPTY;
Aer namingPrice = Aer.ZERO;

@NonNull
@Default
Aer totalVotingPower = Aer.ZERO;

@NonNull
@Default
Aer votingReward = Aer.ZERO;
}
2 changes: 1 addition & 1 deletion core/protobuf/src/main
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ public ChainInfo apply(final Rpc.ChainInfo rpcChainInfo) {
.totalStaked(parseToAer(rpcChainInfo.getTotalstaking()))
.gasPrice(parseToAer(rpcChainInfo.getGasprice()))
.namingPrice(parseToAer(rpcChainInfo.getNameprice()))
.totalVotingPower(parseToAer(rpcChainInfo.getTotalvotingpower()))
.votingReward(parseToAer(rpcChainInfo.getVotingreward()))
.build();
logger.trace("Domain chain info converted: {}", domainChainInfo);
return domainChainInfo;
Expand Down
4 changes: 2 additions & 2 deletions test/aergo.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# mega config (node version)
# versions must separated by space (1.3.1 2.0.0 2.1.0)
defaultAergoVersion=2.0.1
aergoVersions=2.0.1
defaultAergoVersion=2.0.2
aergoVersions=2.0.2

# aergo config
aergoNodeName=aergo.node
Expand Down

0 comments on commit d8d03aa

Please sign in to comment.