From a8bf3d05a7fed2f62f2494593af584df66b47583 Mon Sep 17 00:00:00 2001 From: yinyiqian1 Date: Wed, 16 Sep 2026 17:32:44 -0400 Subject: [PATCH] add fee test --- src/test/app/ConfidentialTransfer_test.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/test/app/ConfidentialTransfer_test.cpp b/src/test/app/ConfidentialTransfer_test.cpp index a964193c1a..e6859d8d3d 100644 --- a/src/test/app/ConfidentialTransfer_test.cpp +++ b/src/test/app/ConfidentialTransfer_test.cpp @@ -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