Skip to content

Commit

Permalink
fix: Change minFeeRefScriptCostPerByte from BigInteger to BigDecimal …
Browse files Browse the repository at this point in the history
…(node 8.11.0)
  • Loading branch information
satran004 committed May 19, 2024
1 parent 43eb19f commit 36465f0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ public class ProtocolParamUpdate {
private BigInteger govActionDeposit; //30
private BigInteger drepDeposit; //31
private Integer drepActivity; //32
private Integer minFeeRefScriptCostPerByte; //33
private BigDecimal minFeeRefScriptCostPerByte; //33
}
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public ProtocolParamUpdate getProtocolParams(Map genesisProtocolParamsMap) {
Integer drepInactivityPeriod = itemDI != null ? toInt(itemDI) : null;

itemDI = genesisProtocolParamsMap.get(new UnsignedInteger(33));
Integer minFeeRefScriptCostPerByte = itemDI != null ? toInt(itemDI) : null;
BigDecimal minFeeRefScriptCostPerByte = itemDI != null ? toRationalNumber(itemDI) : null;

ProtocolParamUpdate protocolParamUpdate = ProtocolParamUpdate.builder()
.minFeeA(minFeeA)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,10 +422,10 @@ public CurrentProtocolParamQueryResult deserializeResult(DataItem[] di) {
itemDI = paramsDIList.get(29);
Integer drepInactivityPeriod = itemDI != null ? toInt(itemDI) : null;

Integer minFeeRefScriptCostPerByte = null; //TODO -- Remove if condition once this is available in the node release
BigDecimal minFeeRefScriptCostPerByte = null; //TODO -- Remove if condition once this is available in the node release
if (paramsDIList.size() > 30) {
itemDI = paramsDIList.get(30);
minFeeRefScriptCostPerByte = itemDI != null ? toInt(itemDI) : null;
minFeeRefScriptCostPerByte = itemDI != null ? toRationalNumber(itemDI) : null;
}

ProtocolParamUpdate protocolParams = ProtocolParamUpdate.builder()
Expand Down

0 comments on commit 36465f0

Please sign in to comment.