Skip to content

Commit

Permalink
test: fix submittingNodeStillPaidIfServiceFeesOmitted test
Browse files Browse the repository at this point in the history
Signed-off-by: Mustafa Uzun <mustafa.uzun@limechain.tech>
  • Loading branch information
mustafauzunn committed Dec 20, 2023
1 parent ec2c2bd commit 66e649d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public void checkSolvency(
return;
}

final var totalFee = fees.totalFee();
final var totalFee = ingestCheck ? fees.totalWithoutServiceFee() : fees.totalFee();
final var availableBalance = account.tinybarBalance();
final var offeredFee = txBody.transactionFee();
final ResponseCodeEnum insufficientFeeResponseCode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.hedera.services.bdd.suites.records;

import static com.hedera.services.bdd.spec.HapiSpec.defaultHapiSpec;
import static com.hedera.services.bdd.spec.HapiSpec.propertyPreservingHapiSpec;
import static com.hedera.services.bdd.spec.assertions.AccountInfoAsserts.changeFromSnapshot;
import static com.hedera.services.bdd.spec.assertions.AssertUtils.inOrder;
import static com.hedera.services.bdd.spec.assertions.TransactionRecordAsserts.recordWith;
Expand All @@ -33,6 +34,7 @@
import static com.hedera.services.bdd.spec.utilops.CustomSpecAssert.allRunFor;
import static com.hedera.services.bdd.spec.utilops.UtilVerbs.assertionsHold;
import static com.hedera.services.bdd.spec.utilops.UtilVerbs.balanceSnapshot;
import static com.hedera.services.bdd.spec.utilops.UtilVerbs.overridingTwo;
import static com.hedera.services.bdd.spec.utilops.UtilVerbs.sleepFor;
import static com.hedera.services.bdd.spec.utilops.UtilVerbs.sourcing;
import static com.hedera.services.bdd.spec.utilops.UtilVerbs.usableTxnIdNamed;
Expand Down Expand Up @@ -86,12 +88,17 @@ public List<HapiSpec> getSpecsInSuite() {
submittingNodeStillPaidIfServiceFeesOmitted());
}

@HapiTest
final HapiSpec submittingNodeStillPaidIfServiceFeesOmitted() {
final String comfortingMemo = THIS_IS_OK_IT_S_FINE_IT_S_WHATEVER;
final AtomicReference<FeeObject> feeObs = new AtomicReference<>();

return defaultHapiSpec("submittingNodeStillPaidIfServiceFeesOmitted")
return propertyPreservingHapiSpec("submittingNodeStillPaidIfServiceFeesOmitted")
.preserving(STAKING_FEES_NODE_REWARD_PERCENTAGE, STAKING_FEES_STAKING_REWARD_PERCENTAGE)
.given(
overridingTwo(
STAKING_FEES_NODE_REWARD_PERCENTAGE, "10",
STAKING_FEES_STAKING_REWARD_PERCENTAGE, "10"),
cryptoTransfer(tinyBarsFromTo(GENESIS, TO_ACCOUNT, ONE_HBAR))
.payingWith(GENESIS),
cryptoCreate(PAYER),
Expand Down

0 comments on commit 66e649d

Please sign in to comment.