public class Consensus extends Object
| 构造器和说明 |
|---|
Consensus() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Hash |
calcPKsMerkleRootHash(Set<PublicKey> publicKeys) |
static Hash |
calcPKsMerkleRootHash(Set<PublicKey> publicKeys,
HashTypeEnum hashTypeEnum) |
static Hash |
calcProofHash(Hash parentHash,
Hash txRoot,
Hash pksHash,
int nodeSize,
long timestamp) |
static Hash |
calcProofHash(Hash parentHash,
Hash txRoot,
Hash pksHash,
int nodeSize,
long timestamp,
HashTypeEnum hashTypeEnum) |
static int |
threshold2f(int n) |
static boolean |
verifyConsensusProof(List<byte[]> signatures,
byte[] digest,
Set<PublicKey> publicKeys) |
static boolean |
verifyConsensusProof(List<byte[]> signatures,
byte[] digest,
Set<PublicKey> publicKeys,
HashTypeEnum hashTypeEnum) |
public static int threshold2f(int n)
public static Hash calcPKsMerkleRootHash(Set<PublicKey> publicKeys, HashTypeEnum hashTypeEnum)
public static Hash calcProofHash(Hash parentHash, Hash txRoot, Hash pksHash, int nodeSize, long timestamp)
public static Hash calcProofHash(Hash parentHash, Hash txRoot, Hash pksHash, int nodeSize, long timestamp, HashTypeEnum hashTypeEnum)
public static boolean verifyConsensusProof(List<byte[]> signatures, byte[] digest, Set<PublicKey> publicKeys)
public static boolean verifyConsensusProof(List<byte[]> signatures, byte[] digest, Set<PublicKey> publicKeys, HashTypeEnum hashTypeEnum)
Copyright © 2022. All rights reserved.