Skip to content

Add slashing spans#85

Merged
danforbes merged 5 commits intomasterfrom
joe-add-slashingspans
Jun 14, 2020
Merged

Add slashing spans#85
danforbes merged 5 commits intomasterfrom
joe-add-slashingspans

Conversation

@joepetrowski
Copy link
Collaborator

@joepetrowski joepetrowski commented Jun 14, 2020

Adds numSlashingSpans to staking endpoint for use in withdrawUnbonded.

I added only a numSlashingSpans: int to the output to reduce the risk of breaking the API. If we learn that SlashingSpans is useful for users then we can add that without breaking this, but from what I can tell so far, this struct is only used for Offchain Phragmen and calculating numSlashingSpans.

In fact, if SlashingSpans is useful to people, I would suggest a whole new endpoint for it while leaving numSlashingSpans here. The purpose of the STAKING endpoint is to get relevant info about a staked account to prepare for calls like unbond, bondExtra, withdrawUnbonded. It should not turn into a junk drawer for staking information.

Copy link
Contributor

@danforbes danforbes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went through an ad hoc offline review with Joe to go over some nitpicks I had.

@danforbes danforbes merged commit 0ee4d92 into master Jun 14, 2020
@danforbes danforbes deleted the joe-add-slashingspans branch June 14, 2020 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants