From 4bf0cb40f581bff4334864bea34ae669e4be8f36 Mon Sep 17 00:00:00 2001 From: magnusbechwind Date: Wed, 25 Oct 2023 10:38:14 +0200 Subject: [PATCH 1/5] Updated concordium-base --- concordium-base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/concordium-base b/concordium-base index 4e980f763..e7e01ef0f 160000 --- a/concordium-base +++ b/concordium-base @@ -1 +1 @@ -Subproject commit 4e980f763b0014129529224fd22ed3d34e6304bd +Subproject commit e7e01ef0f1100185722330885fb0c4ddacbd7e45 From 472364d99a8972ac8f0aed000335289a488b7fff Mon Sep 17 00:00:00 2001 From: magnusbechwind Date: Wed, 25 Oct 2023 10:39:02 +0200 Subject: [PATCH 2/5] Added CommissionRates to CurrentPaydayStatus --- .../java/com/concordium/sdk/ClientV2MapperExtensions.java | 1 + .../sdk/responses/poolstatus/CurrentPaydayStatus.java | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/concordium-sdk/src/main/java/com/concordium/sdk/ClientV2MapperExtensions.java b/concordium-sdk/src/main/java/com/concordium/sdk/ClientV2MapperExtensions.java index add487a94..9fb4faaec 100644 --- a/concordium-sdk/src/main/java/com/concordium/sdk/ClientV2MapperExtensions.java +++ b/concordium-sdk/src/main/java/com/concordium/sdk/ClientV2MapperExtensions.java @@ -1240,6 +1240,7 @@ static com.concordium.sdk.responses.poolstatus.PendingChange to(PoolPendingChang .finalizationLive(currentPaydayInfo.getFinalizationLive()) .lotteryPower(currentPaydayInfo.getLotteryPower()) .transactionFeesEarned(to(currentPaydayInfo.getTransactionFeesEarned())) + .commissionRates(CommissionRates.from(currentPaydayInfo.getCommissionRates())) .build(); } diff --git a/concordium-sdk/src/main/java/com/concordium/sdk/responses/poolstatus/CurrentPaydayStatus.java b/concordium-sdk/src/main/java/com/concordium/sdk/responses/poolstatus/CurrentPaydayStatus.java index cb93850da..8996dd207 100644 --- a/concordium-sdk/src/main/java/com/concordium/sdk/responses/poolstatus/CurrentPaydayStatus.java +++ b/concordium-sdk/src/main/java/com/concordium/sdk/responses/poolstatus/CurrentPaydayStatus.java @@ -1,5 +1,6 @@ package com.concordium.sdk.responses.poolstatus; +import com.concordium.sdk.responses.accountinfo.CommissionRates; import com.concordium.sdk.transactions.CCDAmount; import com.concordium.sdk.types.UInt64; import lombok.Builder; @@ -45,4 +46,9 @@ public class CurrentPaydayStatus { * The effective delegated capital to the pool for the current reward period. */ private final CCDAmount delegatedCapital; + + /** + * The commission rates that apply for the current reward period. + */ + private final CommissionRates commissionRates; } From 7401bccd659182b3bb7a0fcd761c25667b40a828 Mon Sep 17 00:00:00 2001 From: magnusbechwind Date: Wed, 25 Oct 2023 10:49:57 +0200 Subject: [PATCH 3/5] Updated test to reflect the new changes --- .../com/concordium/sdk/ClientV2GetPoolInfoTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/concordium-sdk/src/test/java/com/concordium/sdk/ClientV2GetPoolInfoTest.java b/concordium-sdk/src/test/java/com/concordium/sdk/ClientV2GetPoolInfoTest.java index b3c7c5c9e..52d1560fa 100644 --- a/concordium-sdk/src/test/java/com/concordium/sdk/ClientV2GetPoolInfoTest.java +++ b/concordium-sdk/src/test/java/com/concordium/sdk/ClientV2GetPoolInfoTest.java @@ -85,6 +85,11 @@ public class ClientV2GetPoolInfoTest { .setLotteryPower(LOTTERY_POWER) .setFinalizationLive(FINALIZATION_LIVE) .setTransactionFeesEarned(to(TRANSACTION_FEES)) + .setCommissionRates(CommissionRates.newBuilder() + .setBaking(toAmountFrac(COMMISSION_BAKING_PPHT)) + .setFinalization(toAmountFrac(COMMISSION_FINALIZATION_PPHT)) + .setTransaction(toAmountFrac(COMMISSION_TRANSACTION_PPHT)) + .build()) .build()) .setDelegatedCapital(to(DELEGATED_CAPITAL)) .setDelegatedCapitalCap(to(DELEGATED_CAPITAL_CAP)) @@ -120,6 +125,11 @@ public void getPoolInfo(PoolInfoRequest request, StreamObserver Date: Wed, 25 Oct 2023 10:52:32 +0200 Subject: [PATCH 4/5] Updated CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a9c3ecb5..8fe2ae382 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ # Changelog +- Extended `CurrentPaydayStatus` with `CommissionRates` that apply for the current reward period. ## Unreleased changes From 56e8c1c73540a3d913ce60091343e23e23097ec1 Mon Sep 17 00:00:00 2001 From: magnusbechwind Date: Fri, 27 Oct 2023 13:59:33 +0200 Subject: [PATCH 5/5] Updated CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fe2ae382..b9634ade3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Changelog -- Extended `CurrentPaydayStatus` with `CommissionRates` that apply for the current reward period. ## Unreleased changes +- Extended `CurrentPaydayStatus` with `CommissionRates` that apply for the current reward period. Requires at least node version 6.1. ## 5.1.0 - Fixed a regression that made it harder to deserialize transactions from bytes.