Skip to content

Proposal for not having Option<T::DataObjectTypeId> in the DO type#19

Merged
siman merged 1 commit intodevelopmentfrom
unknown repository
Apr 2, 2019
Merged

Proposal for not having Option<T::DataObjectTypeId> in the DO type#19
siman merged 1 commit intodevelopmentfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Mar 27, 2019

Don't merge immediately, @mnaamani - this is for discussion (and possibly merging later on).

So this PR gets the ID out of the struct, which I think is part of what @siman wanted.

I understand the utility of adding a separate update struct, but am not happy with having two structs with essentially the same members that could get out of sync if programmers don't pay attention. So this is my proposal for finishing #7, essentially.

If there's data structures that see updates to individual fields a lot, I think the separate update struct makes sense. Here, the only member that should get toggled a lot is the active flag, and that should happen rarely enough (tied to storage tranches coming post-Athens).

WDYT?

struct. We have no reason in the runtime to store it as part of the
struct.
@siman siman requested review from mnaamani and siman March 28, 2019 19:21
@mnaamani
Copy link
Copy Markdown
Member

mnaamani commented Apr 2, 2019

I think this is very sensible, and I like how much simpler the code is.

@siman siman merged commit bce27bc into Joystream:development Apr 2, 2019
shamil-gadelshin pushed a commit to shamil-gadelshin/joystream-network that referenced this pull request Mar 9, 2020
shamil-gadelshin pushed a commit to shamil-gadelshin/joystream-network that referenced this pull request Mar 9, 2020
mnaamani pushed a commit to mnaamani/joystream that referenced this pull request Mar 20, 2020
mnaamani pushed a commit to mnaamani/joystream that referenced this pull request Jun 19, 2020
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