mirror of
https://github.com/Qortal/qortal.git
synced 2025-05-05 09:17:51 +00:00
Update QortalATAPI.putTransactionAfterTimestampIntoA() to use Transaction.getRecipientAddresses
This commit is contained in:
parent
6be88ac86e
commit
e1f3b9a7a3
@ -3,7 +3,6 @@ package org.qortal.at;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
@ -179,8 +178,7 @@ public class QortalATAPI extends API {
|
|||||||
Transaction transaction = blockTransactions.get(sequence);
|
Transaction transaction = blockTransactions.get(sequence);
|
||||||
|
|
||||||
// Transaction needs to be sent to specified recipient
|
// Transaction needs to be sent to specified recipient
|
||||||
List<Account> recipientAccounts = transaction.getRecipientAccounts();
|
List<String> recipientAddresses = transaction.getRecipientAddresses();
|
||||||
List<String> recipientAddresses = recipientAccounts.stream().map(Account::getAddress).collect(Collectors.toList());
|
|
||||||
if (recipientAddresses.contains(atAddress)) {
|
if (recipientAddresses.contains(atAddress)) {
|
||||||
// Found a transaction
|
// Found a transaction
|
||||||
|
|
||||||
|
@ -395,16 +395,6 @@ public abstract class Transaction {
|
|||||||
return blockChainHeight - ourHeight + 1;
|
return blockChainHeight - ourHeight + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a list of recipient accounts for this transaction.
|
|
||||||
*
|
|
||||||
* @return list of recipients accounts, or empty list if none
|
|
||||||
* @throws DataException
|
|
||||||
*/
|
|
||||||
public List<Account> getRecipientAccounts() throws DataException {
|
|
||||||
throw new DataException("Placeholder for new AT code");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of recipient addresses for this transaction.
|
* Returns a list of recipient addresses for this transaction.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user