Package nxt.blockchain
Class TransactionType
java.lang.Object
nxt.blockchain.TransactionType
- Direct Known Subclasses:
ChildTransactionType,FxtTransactionType
-
Method Summary
Modifier and TypeMethodDescriptionabstract voidapply(TransactionImpl transaction, Account senderAccount, Account recipientAccount) abstract voidapplyAttachment(Transaction transaction, Account senderAccount, Account recipientAccount) abstract booleanapplyAttachmentUnconfirmed(Transaction transaction, Account senderAccount) abstract booleanapplyUnconfirmed(TransactionImpl transaction, Account senderAccount) abstract booleanstatic TransactionTypefindTransactionType(byte type, byte subtype) abstract FeegetBaselineFee(Transaction transaction) intabstract List<ChildChain>getInvolvedChildChains(Transaction transaction) abstract AccountLedger.LedgerEventabstract StringgetName()getNextFee(Transaction transaction) intabstract byteabstract bytegetType()booleanisBlockDuplicate(Transaction transaction, Map<TransactionType, Map<String, Integer>> duplicates) booleanisDuplicate(Transaction transaction, Map<TransactionType, Map<String, Integer>> duplicates) static booleanisDuplicate(TransactionType uniqueType, String key, Map<TransactionType, Map<String, Integer>> duplicates, boolean exclusive) protected static booleanisDuplicate(TransactionType uniqueType, String key, Map<TransactionType, Map<String, Integer>> duplicates, int maxCount) abstract booleanisGlobal()booleanabstract booleanTransaction is Phasing Unsafe if it's validity may change between the height it is accepted in the blockchain and the height it is executed.booleanbooleanisUnconfirmedDuplicate(Transaction transaction, Map<TransactionType, Map<String, Integer>> duplicates) booleanabstract Attachment.AbstractAttachmentparseAttachment(ByteBuffer buffer) abstract Attachment.AbstractAttachmentparseAttachment(org.json.simple.JSONObject attachmentData) final StringtoString()abstract voidundoAttachmentUnconfirmed(Transaction transaction, Account senderAccount) abstract voidundoUnconfirmed(TransactionImpl transaction, Account senderAccount) abstract voidvalidateAttachment(Transaction transaction) protected abstract voidvalidateId(Transaction transaction)
-
Method Details
-
findTransactionType
-
getType
public abstract byte getType() -
getSubtype
public abstract byte getSubtype() -
getLedgerEvent
-
parseAttachment
public abstract Attachment.AbstractAttachment parseAttachment(ByteBuffer buffer) throws NxtException.NotValidException - Throws:
NxtException.NotValidException
-
parseAttachment
public abstract Attachment.AbstractAttachment parseAttachment(org.json.simple.JSONObject attachmentData) throws NxtException.NotValidException - Throws:
NxtException.NotValidException
-
validateAttachment
public abstract void validateAttachment(Transaction transaction) throws NxtException.ValidationException - Throws:
NxtException.ValidationException
-
applyUnconfirmed
-
applyAttachmentUnconfirmed
-
apply
public abstract void apply(TransactionImpl transaction, Account senderAccount, Account recipientAccount) -
applyAttachment
public abstract void applyAttachment(Transaction transaction, Account senderAccount, Account recipientAccount) -
undoUnconfirmed
-
undoAttachmentUnconfirmed
-
isDuplicate
public boolean isDuplicate(Transaction transaction, Map<TransactionType, Map<String, Integer>> duplicates) -
isBlockDuplicate
public boolean isBlockDuplicate(Transaction transaction, Map<TransactionType, Map<String, Integer>> duplicates) -
isUnconfirmedDuplicate
public boolean isUnconfirmedDuplicate(Transaction transaction, Map<TransactionType, Map<String, Integer>> duplicates) -
isDuplicate
public static boolean isDuplicate(TransactionType uniqueType, String key, Map<TransactionType, Map<String, Integer>> duplicates, boolean exclusive) -
isDuplicate
protected static boolean isDuplicate(TransactionType uniqueType, String key, Map<TransactionType, Map<String, Integer>> duplicates, int maxCount) -
isPruned
-
canHaveRecipient
public abstract boolean canHaveRecipient() -
mustHaveRecipient
public boolean mustHaveRecipient() -
isPhasingSafe
public abstract boolean isPhasingSafe()Transaction is Phasing Unsafe if it's validity may change between the height it is accepted in the blockchain and the height it is executed.- Returns:
- true if it's validity cannot change
-
isPhasable
public boolean isPhasable() -
isGlobal
public abstract boolean isGlobal() -
getBaselineFee
-
getNextFee
-
getBaselineFeeHeight
public int getBaselineFeeHeight() -
getNextFeeHeight
public int getNextFeeHeight() -
getName
-
getInvolvedChildChains
-
toString
-
validateId
- Throws:
NxtException.ValidationException
-