public class ChainConfigData extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
blocksizeMax |
static int |
blocksizeMin |
| Constructor and Description |
|---|
ChainConfigData(ByzCoinProto.ChainConfig config)
Construct a config given the protobuf-representation of the config.
|
ChainConfigData(ChainConfigData config)
Construct a copy of the object.
|
ChainConfigData(Instance inst)
Construct a config given the instance of the existing config.
|
| Modifier and Type | Method and Description |
|---|---|
void |
setInterval(java.time.Duration newInterval)
Sets the interval between two blocks.
|
void |
setMaxBlockSize(int newSize)
Sets the new maximum block size, which must be bigger than 2**14 bytes or 16kiBytes.
|
void |
setRoster(Roster newRoster)
Sets a new roster for ByzCoin.
|
ByzCoinProto.ChainConfig |
toProto() |
public static final int blocksizeMin
public static final int blocksizeMax
public ChainConfigData(Instance inst) throws CothorityNotFoundException
inst - the instanceCothorityNotFoundException - if the read request in the instance is corruptpublic ChainConfigData(ByzCoinProto.ChainConfig config)
config - the existing configCothorityNotFoundException - if the read request in the instance is corruptpublic ChainConfigData(ChainConfigData config)
config - the old configCothorityNotFoundException - if the read request in the instance is corruptpublic void setRoster(Roster newRoster) throws CothorityPermissionException, CothorityCommunicationException
newRoster - the new roster to useCothorityPermissionException - if the new roster is not correctly set up.CothorityCommunicationException - if the old roster contained an error.public void setInterval(java.time.Duration newInterval)
throws CothorityPermissionException
newInterval - the new interval - bigger or equal to 5 seconds.CothorityPermissionException - if the chosen interval is wrong.public void setMaxBlockSize(int newSize)
throws CothorityPermissionException
newSize - how many bytes should fit maximally into a new blockCothorityPermissionException - if the given size is wrongpublic ByzCoinProto.ChainConfig toProto()
Copyright © 2018. All rights reserved.