Modifier and Type | Class and Description |
---|---|
static class |
Generator.ActiveGenerator
Active generator
|
static class |
Generator.Event |
Modifier and Type | Method and Description |
---|---|
static boolean |
addListener(Listener<Generator> listener,
Generator.Event eventType) |
static boolean |
allowsFakeForging(byte[] publicKey) |
int |
compareTo(Generator g) |
long |
getAccountId() |
static java.util.Collection<Generator> |
getAllGenerators() |
long |
getDeadline() |
static Generator |
getGenerator(byte[] privateKey) |
static int |
getGeneratorCount() |
long |
getHitTime() |
static java.util.List<Generator.ActiveGenerator> |
getNextGenerators()
Return a list of generators for the next block.
|
static long |
getNextHitTime(long lastBlockId,
int curTime) |
byte[] |
getPublicKey() |
static java.util.List<Generator> |
getSortedForgers() |
static void |
init() |
static boolean |
removeListener(Listener<Generator> listener,
Generator.Event eventType) |
static void |
setDelay(int delay) |
static Generator |
startForging(byte[] privateKey) |
static int |
stopForging() |
static Generator |
stopForging(byte[] privateKey) |
java.lang.String |
toString() |
static boolean |
verifyHit(java.math.BigInteger hit,
java.math.BigInteger effectiveBalance,
Block previousBlock,
int timestamp) |
public static void init()
public static boolean addListener(Listener<Generator> listener, Generator.Event eventType)
public static boolean removeListener(Listener<Generator> listener, Generator.Event eventType)
public static Generator startForging(byte[] privateKey)
public static Generator stopForging(byte[] privateKey)
public static int stopForging()
public static Generator getGenerator(byte[] privateKey)
public static int getGeneratorCount()
public static java.util.Collection<Generator> getAllGenerators()
public static java.util.List<Generator> getSortedForgers()
public static long getNextHitTime(long lastBlockId, int curTime)
public static void setDelay(int delay)
public static boolean verifyHit(java.math.BigInteger hit, java.math.BigInteger effectiveBalance, Block previousBlock, int timestamp)
public static boolean allowsFakeForging(byte[] publicKey)
public byte[] getPublicKey()
public long getAccountId()
public long getDeadline()
public long getHitTime()
public int compareTo(Generator g)
compareTo
in interface java.lang.Comparable<Generator>
public java.lang.String toString()
toString
in class java.lang.Object
public static java.util.List<Generator.ActiveGenerator> getNextGenerators()