Documentation ¶
Index ¶
- Constants
- type Vocone
- func (vc *Vocone) Commit() ([]byte, error)
- func (vc *Vocone) CreateAccount(key common.Address, acc *state.Account) error
- func (vc *Vocone) EnableAPI(host string, port int, URLpath string) (*api.API, error)
- func (vc *Vocone) SetBlockSize(txsCount int)
- func (vc *Vocone) SetBlockTimeTarget(targetTime time.Duration)
- func (vc *Vocone) SetBulkTxCosts(txCost uint64, force bool) error
- func (vc *Vocone) SetElectionPrice() error
- func (vc *Vocone) SetKeyKeeper(key *ethereum.SignKeys) error
- func (vc *Vocone) SetTxCost(txType models.TxType, cost uint64) error
- func (vc *Vocone) Start()
Constants ¶
const ( DefaultTxsPerBlock = 500 DefaultBlockTimeTarget = time.Second * 5 DefaultTxCosts = 10 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Vocone ¶
type Vocone struct { service.VocdoniService // contains filtered or unexported fields }
Vocone is an implementation of the Vocdoni protocol run by a single (atomic) node.
func NewVocone ¶
func NewVocone(dataDir string, keymanager *ethereum.SignKeys, disableIPFS bool, connectKey string, connectPeers []string) (*Vocone, error)
NewVocone returns a ready Vocone instance.
func (*Vocone) CreateAccount ¶
CreateAccount creates a new account in the state.
func (*Vocone) SetBlockSize ¶
SetBlockSize configures the maximum number of transactions per block.
func (*Vocone) SetBlockTimeTarget ¶
SetBlockTimeTarget configures the time window in which blocks will be created.
func (*Vocone) SetBulkTxCosts ¶
SetBulkTxCosts sets the transaction cost for all existing transaction types. It is useful to bootstrap the blockchain by set the transaction cost for all transaction types at once. If force is enabld the cost is set for all tx types. If force is disabled, the cost is set only for tx types that have not been set.
func (*Vocone) SetElectionPrice ¶ added in v1.8.0
SetElectionPrice sets the election price.
func (*Vocone) SetKeyKeeper ¶ added in v1.4.0
SetKeyKeeper adds a keykeeper to the application.