mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-10 07:58:22 -05:00
propose collation called if addr from sample is coinbase
Former-commit-id: 95d9c92597ded3ddb607370f43702122c44b5f56 [formerly f19f1fd28b1f8d44b27e054cfccf39b37110149a] Former-commit-id: 1364ac025a86fd1b489255646efeb0b09c1c3cb0
This commit is contained in:
@@ -60,9 +60,21 @@ func watchShards(c *Client, head *types.Header) error {
|
||||
s := 0
|
||||
for s < int(count.Int64()) {
|
||||
// Checks if we are an eligible proposer according to the VMC
|
||||
log.Info(fmt.Sprintf("shard %d", s))
|
||||
addr, err := c.vmc.VMCCaller.Sample(&ops, big.NewInt(s))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// if the address is the coinbase addr (current node running the sharding
|
||||
// clint, then we propose a new collation)
|
||||
if addr == accounts[0].Address {
|
||||
proposeCollation()
|
||||
}
|
||||
s++
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func proposeCollation() {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user