Package com.h2tcoin.takamakachain.state
Class TkmCSBS
- java.lang.Object
-
- com.h2tcoin.takamakachain.state.TkmCSBS
-
public class TkmCSBS extends Object
- Author:
- giovanni.antino@h2tcoin.com
-
-
Field Summary
Fields Modifier and Type Field Description static Object
CHAIN_STATE_LOCK
static Object
DEFAULT_STATE_LOCK
-
Method Summary
-
-
-
Method Detail
-
i
public static TkmCSBS i()
-
goToNextStatus
public void goToNextStatus(ESBean esb, boolean skip)
-
setEpoch
public void setEpoch(int epoch)
-
setSlot
public void setSlot(int slot)
-
goToNextStatusTest
public void goToNextStatusTest(int epoch, int slot, boolean skip, Date bootstrapDate)
-
updateOTR
public void updateOTR()
updates the state of the blockchain when the slot is not skipped
-
getPreviousBlockHash
public String getPreviousBlockHash()
-
getPreviousEpoch
public int getPreviousEpoch()
-
getPreviousSlot
public int getPreviousSlot()
-
getPreviousDatabaseName
public String getPreviousDatabaseName()
-
getPreviousPreviousBlockHash
public String getPreviousPreviousBlockHash()
-
getPreviousPreviousEpoch
public int getPreviousPreviousEpoch()
-
getPreviousPreviousSlot
public int getPreviousPreviousSlot()
-
getPreviousPreviousDatabaseName
public String getPreviousPreviousDatabaseName()
-
getPreviousPreviousPreviousBlockHash
public String getPreviousPreviousPreviousBlockHash()
-
getPreviousPreviousPreviousEpoch
public int getPreviousPreviousPreviousEpoch()
-
getPreviousPreviousPreviousSlot
public int getPreviousPreviousPreviousSlot()
-
getPreviousPreviousPreviousDatabaseName
public String getPreviousPreviousPreviousDatabaseName()
-
getCurrentEpochSlotDistribution
public ConcurrentSkipListMap<String,ConcurrentSkipListSet<Integer>> getCurrentEpochSlotDistribution()
-
setCurrentEpochSlotDistribution
public void setCurrentEpochSlotDistribution(ConcurrentSkipListMap<String,ConcurrentSkipListSet<Integer>> cesd)
-
getOneThirdRecord
public ConcurrentSkipListMap<Integer,OneThirdRecord> getOneThirdRecord()
-
getEpochSeed
public String getEpochSeed(int epoch)
-
setEpochSeed
public void setEpochSeed(String epochSeed)
-
getSlotTime
public long getSlotTime()
-
getWorldInitTime
public long getWorldInitTime()
-
getEpoch
public int getEpoch()
-
getSlot
public int getSlot()
-
isFirstBlock
public boolean isFirstBlock()
-
isSkippedState
public boolean isSkippedState()
-
getBlockHash
public String getBlockHash()
-
setBlockHash
public void setBlockHash(String bH)
-
setStartDate
public void setStartDate(Date bootstrapDate)
-
setSeed
public void setSeed(String seed, int epoch)
-
getDatabaseUIDD
public String getDatabaseUIDD()
-
getCurrentSlotDistribution
public ConcurrentSkipListMap<String,ConcurrentSkipListSet<Integer>> getCurrentSlotDistribution()
-
getNextSlotDistribution
public ConcurrentSkipListMap<String,ConcurrentSkipListSet<Integer>> getNextSlotDistribution()
-
getProposedKeys
public ConcurrentSkipListMap<String,TkmProposedKey> getProposedKeys()
-
getOperationalRecord
public ConcurrentSkipListMap<Integer,MainRecordBean> getOperationalRecord()
-
setOperationalRecord
public void setOperationalRecord(ConcurrentSkipListMap<Integer,MainRecordBean> operationalRecord)
-
saveCSB
public void saveCSB()
-
saveToDefault
public void saveToDefault()
-
loadCsb
public KeyWriterGlobalStatus loadCsb(int epoch, int slot, String blockHash)
-
loadDefault
public KeyWriterGlobalStatus loadDefault()
-
setSkippedState
public void setSkippedState(boolean sk)
-
setCurrentEpochWeight
public void setCurrentEpochWeight(BigInteger weight)
-
setChainWeight
public void setChainWeight(BigInteger weight)
-
getChainWeight
public BigInteger getChainWeight()
-
getCurrentEpochWeight
public BigInteger getCurrentEpochWeight()
-
setNextEpochSlotWeight
public void setNextEpochSlotWeight(BigInteger input)
-
setNextSlotDistribution
public void setNextSlotDistribution(ConcurrentSkipListMap<String,ConcurrentSkipListSet<Integer>> dist)
-
setCurrentSlotDistribution
protected void setCurrentSlotDistribution(ConcurrentSkipListMap<String,ConcurrentSkipListSet<Integer>> dist)
-
shutdownState
public static void shutdownState()
-
-