From 76686eca21df3b9e1e43eb6fde76116321240518 Mon Sep 17 00:00:00 2001 From: CalDescent Date: Sun, 27 Nov 2022 12:23:17 +0000 Subject: [PATCH] Modified reward share creation in test/common/AccountUtils to allow a fee to be specified. --- src/test/java/org/qortal/test/common/AccountUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/qortal/test/common/AccountUtils.java b/src/test/java/org/qortal/test/common/AccountUtils.java index 0d8baae2..c31cd85e 100644 --- a/src/test/java/org/qortal/test/common/AccountUtils.java +++ b/src/test/java/org/qortal/test/common/AccountUtils.java @@ -49,10 +49,10 @@ public class AccountUtils { public static TransactionData createRewardShare(Repository repository, String minter, String recipient, int sharePercent) throws DataException { PrivateKeyAccount mintingAccount = Common.getTestAccount(repository, minter); PrivateKeyAccount recipientAccount = Common.getTestAccount(repository, recipient); - return createRewardShare(repository, mintingAccount, recipientAccount, sharePercent); + return createRewardShare(repository, mintingAccount, recipientAccount, sharePercent, fee); } - public static TransactionData createRewardShare(Repository repository, PrivateKeyAccount mintingAccount, PrivateKeyAccount recipientAccount, int sharePercent) throws DataException { + public static TransactionData createRewardShare(Repository repository, PrivateKeyAccount mintingAccount, PrivateKeyAccount recipientAccount, int sharePercent, long fee) throws DataException { byte[] reference = mintingAccount.getLastReference(); long timestamp = repository.getTransactionRepository().fromSignature(reference).getTimestamp() + 1; @@ -78,7 +78,7 @@ public class AccountUtils { } public static byte[] rewardShare(Repository repository, PrivateKeyAccount minterAccount, PrivateKeyAccount recipientAccount, int sharePercent) throws DataException { - TransactionData transactionData = createRewardShare(repository, minterAccount, recipientAccount, sharePercent); + TransactionData transactionData = createRewardShare(repository, minterAccount, recipientAccount, sharePercent, fee); TransactionUtils.signAndMint(repository, transactionData, minterAccount); byte[] rewardSharePrivateKey = minterAccount.getRewardSharePrivateKey(recipientAccount.getPublicKey());