Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Account for repatriate_reserved #6329

@joepetrowski

Description

@joepetrowski

repatriate_reserved gets called in a few places (e.g. reaping a preimage, reaping an inactive voter, providing judgement, closing social recovery) and transfers some balance between two accounts. Since this is called internally, you can't see the parameters to this function and there's no way to reconcile the account balances externally.

Also, the amount transferred might not equal the amount passed in. Here in democracy we discard the leftover amount but report the param in the event. However, if the account had been slashed, that's not the actual amount transferred.

We should emit an event here with the addresses involved, actual amount transferred, and free/reserved status.

Likewise, unreserve transfers some amount between reserved and free balance, and the amount might not equal the param passed into it. An event here with who, value would account for this.

Always open to non-event-based solutions as I understand the overhead, but these functions are not called regularly, they tend to be things that happen a few times per month.

Metadata

Metadata

Assignees

Labels

J0-enhancementAn additional feature request.U1-asapNo need to stop dead in your tracks, however issue should be addressed as soon as possible.Z1-easyCan be fixed primarily by duplicating and adapting code by an intermediate coder

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions