Class TkmOperations
- java.lang.Object
-
- com.h2tcoin.takamakachain.utils.threadSafeUtils.TkmOperations
-
public class TkmOperations extends Object
- Author:
- Giovanni Antino
-
-
Constructor Summary
Constructors Constructor Description TkmOperations()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InternalBlockBean
generateBlock(KeyWriterGlobalStatus kwGS, TransactionBox[] transactions, InstanceWalletKeystoreInterface nodeWallet, int nodeKey, Date blockDate)
static KeyWriterGlobalStatus
goToNextStatus(KeyWriterGlobalStatus oldKWGS, TransactionBox[] tansactions, int epoch, int slot, String uid, long slotTime)
static void
persistGlobalStatus(KeyWriterGlobalStatus kwGS)
static void
pushTransactions(KeyWriterGlobalStatus kwGS, TransactionBox[] transactions)
Evaluates current transactions and applies them to the current system status if valid.static void
pushTransactions(KeyWriterGlobalStatus kwGS, TransactionBox[] transactions, ConcurrentSkipListMap<String,TkmRewardBean> blockListPayback)
Evaluates current transactions and applies them to the current system status if valid.It also updates the list of transaction errors and calculates the processing cost incurred by the node.
-
-
-
Method Detail
-
pushTransactions
public static void pushTransactions(KeyWriterGlobalStatus kwGS, TransactionBox[] transactions)
Evaluates current transactions and applies them to the current system status if valid. It also updates the list of transaction errors and calculates the processing cost incurred by the node.- Parameters:
kwGS
-transactions
-- Throws:
TransactionNotYetImplementedException
-
pushTransactions
public static void pushTransactions(KeyWriterGlobalStatus kwGS, TransactionBox[] transactions, ConcurrentSkipListMap<String,TkmRewardBean> blockListPayback)
Evaluates current transactions and applies them to the current system status if valid.It also updates the list of transaction errors and calculates the processing cost incurred by the node.- Parameters:
kwGS
-transactions
-blockListPayback
-
-
persistGlobalStatus
public static void persistGlobalStatus(KeyWriterGlobalStatus kwGS)
-
goToNextStatus
public static KeyWriterGlobalStatus goToNextStatus(KeyWriterGlobalStatus oldKWGS, TransactionBox[] tansactions, int epoch, int slot, String uid, long slotTime)
-
generateBlock
public static InternalBlockBean generateBlock(KeyWriterGlobalStatus kwGS, TransactionBox[] transactions, InstanceWalletKeystoreInterface nodeWallet, int nodeKey, Date blockDate)
- Parameters:
kwGS
-trxs
-nodeWallet
- ignored TODO removenodeKey
- ignored TODO removeblockDate
-- Returns:
-
-