good morning!!!!

Skip to content
Snippets Groups Projects
Commit 4037b099 authored by atvanguard's avatar atvanguard
Browse files

Add GetCurrentProposer API call :construction:

parent b343bd10
No related branches found
No related tags found
No related merge requests found
......@@ -87,3 +87,13 @@ func (api *API) GetSignersAtHash(hash common.Hash) ([]common.Address, error) {
}
return snap.signers(), nil
}
// GetSpan gets the current span details
func (api *API) GetCurrentProposer() (common.Address, error) {
header := api.chain.CurrentHeader()
snap, err := api.bor.snapshot(api.chain, header.Number.Uint64(), header.Hash(), nil)
if err != nil {
return common.BytesToAddress(make([]byte, 20)), err
}
return snap.ValidatorSet.GetProposer().Address, nil
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment