Skip to content

Commit a130cec

Browse files
committed
stroge code
1 parent 074b755 commit a130cec

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

chainbase/src/main/java/org/tron/core/store/DynamicPropertiesStore.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,6 +1426,9 @@ public long getAllowTransactionFeePool() {
14261426
}
14271427

14281428
public void addTransactionFeePool(long amount) {
1429+
if (amount <= 0) {
1430+
return;
1431+
}
14291432
amount += getTransactionFeePool();
14301433
saveTransactionFeePool(amount);
14311434
}
@@ -2137,6 +2140,9 @@ public long getBurnTrxAmount() {
21372140
}
21382141

21392142
public void burnTrx(long amount) {
2143+
if (amount <= 0) {
2144+
return;
2145+
}
21402146
amount += getBurnTrxAmount();
21412147
saveBurnTrx(amount);
21422148
}

framework/src/main/java/org/tron/core/Wallet.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,11 @@ public Protocol.ChainParameters getChainParameters() {
999999
.setValue(dbManager.getDynamicPropertiesStore().getMaxFeeLimit())
10001000
.build());
10011001

1002+
builder.addChainParameter(Protocol.ChainParameters.ChainParameter.newBuilder()
1003+
.setKey("getAllowRemoveBlackHole")
1004+
.setValue(dbManager.getDynamicPropertiesStore().getAllowRemoveBlackHole())
1005+
.build());
1006+
10021007
return builder.build();
10031008
}
10041009

0 commit comments

Comments
 (0)