add fee test

This commit is contained in:
yinyiqian1
2026-09-16 17:32:44 -04:00
parent ad09181e21
commit a8bf3d05a7

View File

@@ -7123,6 +7123,18 @@ class ConfidentialTransfer_test : public ConfidentialTransferTestBase
mptAlice.confidentialClaw(
{.account = alice, .holder = carol, .amt = 15, .fee = expectedFee});
});
// Check fee for the mirror update transaction.
Account const newIssuerKey("newIssuerKey");
mptAlice.generateKeyPair(newIssuerKey);
mptAlice.set({.account = alice, .issuerPubKey = mptAlice.getPubKey(newIssuerKey)});
checkFee(alice, [&]() {
mptAlice.mirrorUpdate(
{.account = alice,
.holder = bob,
.issuerEncryptedAmount = getTrivialCiphertext(),
.fee = expectedFee});
});
}
// test insufficient fee for confidential transactions
@@ -7154,6 +7166,12 @@ class ConfidentialTransfer_test : public ConfidentialTransferTestBase
.amt = 1,
.fee = baseFee,
.err = telINSUF_FEE_P});
mptAlice.mirrorUpdate(
{.account = alice,
.holder = bob,
.issuerEncryptedAmount = getTrivialCiphertext(),
.fee = baseFee,
.err = telINSUF_FEE_P});
}
// test excessive fee for confidential transactions