public class SkipchainRPC extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Roster |
roster |
protected SkipblockId |
scID |
static String |
SERVICE_NANE |
| Constructor and Description |
|---|
SkipchainRPC(Roster roster,
SkipblockId scID)
If the skipchain is already initialised, this constructor will only
initialise the class.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkStatus()
Contacts all nodes in the cothority and returns true only if _all_
nodes returned OK.
|
SkipblockId |
getID()
Getter for the skipchain ID.
|
Roster |
getRoster()
Getter for the roster.
|
SkipBlock |
getSkipblock(SkipblockId id)
Returns the skipblock from the skipchain, given its id.
|
List<SkipBlock> |
getUpdateChain()
Returns a list of blocks block and verify that the links are correct.
|
List<SkipBlock> |
getUpdateChain(SkipblockId trustedLatest)
Returns a list of blocks block and verify that the links are correct.
|
protected SkipblockId scID
protected Roster roster
public static final String SERVICE_NANE
public SkipchainRPC(Roster roster, SkipblockId scID) throws CothorityCommunicationException
roster - list of all cothority servers with public keysscID - the getId of the used skipchainCothorityCommunicationException - in case of communication difficultiespublic boolean checkStatus()
public SkipBlock getSkipblock(SkipblockId id) throws CothorityCommunicationException
id - the id of the skipblockCothorityCommunicationException - in case of communication difficultiespublic List<SkipBlock> getUpdateChain() throws CothorityCommunicationException, CothorityCryptoException
CothorityCommunicationException - if something goes wrong with communicationCothorityCryptoException - if the verification goes wrongpublic List<SkipBlock> getUpdateChain(SkipblockId trustedLatest) throws CothorityCommunicationException, CothorityCryptoException
trustedLatest - is the latest block ID that the caller trusts, which serves as the source for verification.CothorityCommunicationException - if something goes wrong with communicationCothorityCryptoException - if the verification goes wrongpublic SkipblockId getID()
public Roster getRoster()
Copyright © 2019. All rights reserved.