Conversation
Member
meling
commented
Dec 31, 2021
- Added Configuration.Contains(nodeID)
- Changed WithNodeIDs(ids []uint32) to ids ...uint32
- Custom subconfigurations for a tree
This makes it easier to use with single entry node IDs.
This implements methods for constructing subconfigurations. The example implementation provided herein is for a binary tree that can be used for signature aggregation such as Handle.
This makes it easier to use with single entry node IDs.
This implements methods for constructing subconfigurations. The example implementation provided herein is for a binary tree that can be used for signature aggregation such as Handle.
Member
|
Looking at the // AsRawManager provides access to the underlying RawManager of a generated Manager.
type AsRawManager interface {
// AsRaw returns a pointer to the underlying RawManager.
AsRaw() *RawManager
} // Derive subconfigurations from the manager's base configuration.
-func SubConfigurations(mgr *RawManager, opt SubConfigOption) ([]RawConfiguration, error) {
+func SubConfigurations(mgr AsRawManager, opt SubConfigOption) ([]RawConfiguration, error) {
if opt == nil {
return nil, ConfigCreationError(fmt.Errorf("missing required subconfiguration option"))
}
- return opt.subConfig(mgr)
+ return opt.subConfig(mgr.AsRaw())
}This makes it possible to pass a generated manager as the argument to the function, but then there is the problem of converting the raw configurations returned by the function back into generated configurations. Do you have any ideas on how to make this work? |
Member
|
Of course, one solution is to move this function into the generated code, but that would necessitate changes to the |
bea0b8e to
bf7cc7f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.