Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Create a new event VALIDATOR_CHANGED in lisk-chain #5656

Closed
nazarhussain opened this issue Aug 13, 2020 · 0 comments · Fixed by #5674
Closed

Create a new event VALIDATOR_CHANGED in lisk-chain #5656

nazarhussain opened this issue Aug 13, 2020 · 0 comments · Fixed by #5674
Assignees
Milestone

Comments

@nazarhussain
Copy link
Contributor

nazarhussain commented Aug 13, 2020

Description

  • Add EVENT_VALIDATORS_UPDATED in lisk-chain when setValidators is called. the payload should be { validators: Validator[] } which is set.
  • Emit channel event chain:validators:update by listening to the above event. The payload must be in JSON format. (ie: address Buffer must be converted to Base64 string)

Motivation

In lisk-dpos we had an event emitter implemeation for EVENT_ROUND_CHANGED. This does not seems to be relevant any more for the new dpos module. We rather have a different event EVENT_VALIDATOR_CHANGED.

https://github.com/LiskHQ/lisk-sdk/blob/0bd21816e1e1e42a7abaf3619eb37a3f8a915e69/elements/lisk-dpos/src/delegates_info.ts#L144-L147

Round information is no more relevant to on-chain architecture so any of such event should be removed or replaced.

Acceptance Criteria

  • Add unit test to see if the event is emitted on lisk-chain
@nazarhussain nazarhussain mentioned this issue Aug 13, 2020
5 tasks
@sridharmeganathan sridharmeganathan added this to the Sprint 26 milestone Aug 17, 2020
@shuse2 shuse2 changed the title Create a new event VALIDATOR_CHANGED for dpos module Create a new event VALIDATOR_CHANGED in lisk-chain Aug 17, 2020
@pablitovicente pablitovicente self-assigned this Aug 18, 2020
shuse2 added a commit that referenced this issue Aug 19, 2020
…r_changed_in_lisk-chain

Create a new event VALIDATOR_CHANGED in lisk-chain - Closes #5656
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants