-
Notifications
You must be signed in to change notification settings - Fork 0
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
CE 134: Work-package sharing #303
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #303 +/- ##
==========================================
- Coverage 85.53% 85.21% -0.33%
==========================================
Files 307 307
Lines 25092 25253 +161
==========================================
+ Hits 21463 21519 +56
- Misses 3629 3734 +105 ☔ View full report in Codecov by Sentry. |
// 4. TODO: Send the bundle to other guarantors | ||
for guarantor in guarantors { | ||
// 5. TODO: Something needs to do, when receive workpackage bundle | ||
try await guarantor.receiveWorkPackageBundle( |
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.
we can't directly invoke methods on other guarantors. this should be emit an event.
and the networking code should listen to this event to make network request
and the networking code to handle the request by emit another event
and guaranteeing service listen to the event and call receiveWorkPackageBundle
private func refinePkg(package: WorkPackageRef) async throws { | ||
// Work Package Sharing (Send Side) | ||
public func shareWorkPackage(coreIndex _: CoreIndex, workPackage: WorkPackageRef, extrinsics: [Data]) async throws { | ||
try await refinePkg(workPackage: workPackage, extrinsics: extrinsics) |
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.
refine is not part of share work package
the tasks to do when received a work package should be:
validate
share work package
refine
share work bundle
No description provided.