Documentation ¶
Index ¶
- Constants
- type Vocone
- func (vc *Vocone) AddOracle(oracleKey *ethereum.SignKeys) 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) MintTokens(to common.Address, amount uint64) 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) SetChainID(chainID string)
- func (vc *Vocone) SetKeyKeeper(key *ethereum.SignKeys) error
- func (vc *Vocone) SetTreasurer(treasurer common.Address) 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 {
// contains filtered or unexported fields
}
Vocone is an implementation of the Vocdoni protocol run by a single (atomic) node.
func (*Vocone) AddOracle ¶
AddOracle adds a new oracle to the state. If oracle exists, does nothing.
func (*Vocone) CreateAccount ¶
CreateAccount creates a new account in the state.
func (*Vocone) MintTokens ¶
MintTokens mints tokens to the given account address
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) SetChainID ¶
SetChainID sets the chainID for the vocone instance
func (*Vocone) SetKeyKeeper ¶ added in v1.4.0
SetKeyKeeper adds a keykeper to the application.
func (*Vocone) SetTreasurer ¶
SetTreasurer configures the vocone treasurer account address