-
Notifications
You must be signed in to change notification settings - Fork 276
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]: encapsulate access to data model structures #1984
[refactor]: encapsulate access to data model structures #1984
Conversation
Codecov Report
@@ Coverage Diff @@
## iroha2-dev #1984 +/- ##
==============================================
- Coverage 77.94% 77.78% -0.17%
==============================================
Files 176 176
Lines 24039 24216 +177
==============================================
+ Hits 18738 18837 +99
- Misses 5301 5379 +78
Continue to review full report at Codecov.
|
37509b3
to
66ddf1d
Compare
Also, maybe |
7bc71e0
to
67d2fba
Compare
it can be either |
67d2fba
to
988acc8
Compare
6136637
to
490042d
Compare
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'll approve after rebasing
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
…eturn error instead of assert panics Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
490042d
to
c87f1c8
Compare
c87f1c8
to
f507d8f
Compare
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
f507d8f
to
3aa4666
Compare
let create_domain = RegisterBox::new(IdentifiableBox::from(Domain::new( | ||
normal_domain_name.clone(), | ||
))); | ||
let normal_domain_id: DomainId = "sora".parse()?; |
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.
While I think this type can be inferred, having more explicit type annotations doesn't hurt.
…1984) Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
…1984) Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
…1984) Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Marin Veršić marin.versic101@gmail.com
Description of the Change
This PR encapsulates access to the data model structures and separates internal structure from the API presented. This will bring about separation of concerns and enable us to have the same API for client applications and wasm access through FFI. Namely, this PR encapsulates FFI heavy structures, it doesn't encapsulate structure such as
Identifiable::Id
because they should be easily serialized across FFI and it's unlikely their internal representation will changeIncludes:
getset
Identifiable
I invite you to think whether this modification of the API is a step in a right direction. Additional simplifications should be left for a separate PR
Issue
Closes #1982
Benefits
Possible Drawbacks
Usage Examples or Tests [optional]
Alternate Designs [optional]