-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix: support node instantiation in external packages #7511
Conversation
- implement ChainGetPath on ChainModuleAPI
Codecov Report
@@ Coverage Diff @@
## master #7511 +/- ##
==========================================
+ Coverage 39.31% 39.32% +0.01%
==========================================
Files 627 627
Lines 66373 66379 +6
==========================================
+ Hits 26092 26105 +13
+ Misses 35763 35759 -4
+ Partials 4518 4515 -3
Continue to review full report at Codecov.
|
func WithEnableLibp2pNode(enable bool) func(s *Settings) error { | ||
return func(s *Settings) error { | ||
s.enableLibp2pNode = enable | ||
return nil | ||
} | ||
} | ||
|
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.
@@ -105,6 +106,10 @@ func (m *ChainModule) ChainGetTipSet(ctx context.Context, key types.TipSetKey) ( | |||
return m.Chain.LoadTipSet(key) | |||
} | |||
|
|||
func (m *ChainModule) ChainGetPath(ctx context.Context, from, to types.TipSetKey) ([]*api.HeadChange, error) { |
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.
change allows ChainModuleAPI
to satisfy the EventsAPI
interface: https://github.com/filecoin-project/lily/pull/745/files#diff-a2a1458325b025a5434765ff39f72c2a2035ef2efdb9aacfaddad32505945088L22
Without these changes lily is unable to use lotus as a library to instantiate a node.
If this could make it into the coming 1.13 release that would be 👌