init vmc validator

Former-commit-id: 64d7a424c48c44917ad7439164f05372582ef857 [formerly 63fa2f70fe30ce4403157ab87e4344a0b5681163]
Former-commit-id: ed84eeb88b0a8b705fdf4c3f6c4a65053c58532e
This commit is contained in:
Raul Jordan
2018-01-28 16:21:46 -06:00
parent c147675ec3
commit 760d3a1289
2 changed files with 15 additions and 0 deletions

View File

@@ -72,6 +72,13 @@ func (c *Client) Start() error {
return err
}
// TODO: Deposit 100ETH into the validator set in the VMC. Checks if account
// is already a validator in the VMC (in the case the client restarted)
// Once that's done we can subscribe to block headers
if err := initVMCValidator(c); err != nil {
return err
}
// Listens to block headers from the geth node and if we are an eligible
// proposer, we fetch pending transactions and propose a collation
if err := subscribeBlockHeaders(c); err != nil {

View File

@@ -66,3 +66,11 @@ func initVMC(c *Client) error {
return nil
}
// initVMCValidator checks if the account is a validator in the VMC. If
// the account is not in the set, it will deposit 100ETH into contract.
func initVMCValidator(c *Client) error {
// TODO: Implement
}