Skip to content

Replace RewardAccount with StakeAddress #163

@sandtreader

Description

@sandtreader

The definition of PoolRegistration and GovernanceProposal both use RewardAccount (which is a Vec) to hold the account that deposits should be returned to. This is held as the binary encoding of the address, with the 'e1' header (usually - I'm not sure whether script addresses can be used as well?).

This means there are several places where we need to extract the hash to match with other uses (e.g. in AccountState), which means reconstructing the StakeAddress from binary and then using get_hash().

It would be better if we stored the accounts as StakeAddress to begin with, either by redefining RewardAccount or replacing it.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions