-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[refactor] #1903: move event emission to modify_*
methods
#1931
[refactor] #1903: move event emission to modify_*
methods
#1931
Conversation
modify_*
methods
dd98e1a
to
80ffebe
Compare
Codecov Report
@@ Coverage Diff @@
## iroha2-dev #1931 +/- ##
==============================================
- Coverage 78.04% 77.63% -0.41%
==============================================
Files 164 165 +1
Lines 22625 22907 +282
==============================================
+ Hits 17657 17784 +127
- Misses 4968 5123 +155
Continue to review full report at Codecov.
|
168fb93
to
fbea893
Compare
d74b38e
to
8c5e3bc
Compare
d74f314
to
107d47c
Compare
6998771
to
b3d9789
Compare
Signed-off-by: Arjentix <arjentix@gmail.com>
Signed-off-by: Arjentix <arjentix@gmail.com>
Signed-off-by: Arjentix <arjentix@gmail.com>
Signed-off-by: Arjentix <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Increased(AssetId), | ||
Decreased(AssetId), | ||
MetadataInserted(AssetId), | ||
MetadataRemoved(AssetId), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this event should be called MetadataInserted
. Maybe rather StoreInserted
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, I think there should be only 4 events something like:
pub enum AssetEvent {
Created(AssetId),
Deleted(AssetId),
Added(AssetId),
Removed(AssetId),
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then what events should be produced by SetKeyValue<Asset, Name, Value>
and RemoveKeyValue<Asset, Name>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I see it, asset can be created, deleted, added a quantity or removed a quantity where quantity can be a number or key-value. SetKeyValue
is adding a key value to asset which holds key-value entities
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Arjentix what happened with this? you just resolved the conversation without a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I misunderstood your comment, I've read it as Ah I see it
So do you think, it should be Added
and Removed
for SetKeyValue
and RemoveKeyValue
? In this instructions code there are a lot of metadata
terminology, is it okay then?
Increased(AssetId), | ||
Decreased(AssetId), | ||
MetadataInserted(AssetId), | ||
MetadataRemoved(AssetId), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I see it, asset can be created, deleted, added a quantity or removed a quantity where quantity can be a number or key-value. SetKeyValue
is adding a key value to asset which holds key-value entities
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
b3d9789
to
45e7fee
Compare
Description of the Change
modify_
methods are now implemented through each other. Newmodify_world()
is on topmodify_
methods accepts closures returning strongly typed eventIssue
Resolves #1892
Benefits
modify_
method without event emittingTODO