-
Notifications
You must be signed in to change notification settings - Fork 407
Look-up functions for ReadOnlyNetworkGraph
#1543
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
Look-up functions for ReadOnlyNetworkGraph
#1543
Conversation
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.
Hmmmm, yuckkkk. That's a ton of copying, so much so I'd bet we'll see some nontrivial issues with anyone trying to use this on mobile. I'd much rather expose some method to query for individual entries rather than expose the full set.
Yeah, wasn't really happy about the cloning. But to confirm my understanding of bindings, (1) could we use references instead and (2) is |
References to what? In theory references are supported, we could implement a getter that returns a reference, but most of the language bindings would just clone on the return, which is fine if we're just returning info for one channel.
In general none of the std things are supported, we don't have a manual mapping for maps (unlike vecs). |
Was thinking either |
2d50c17
to
3024b07
Compare
Codecov Report
@@ Coverage Diff @@
## main #1543 +/- ##
==========================================
+ Coverage 90.94% 91.60% +0.65%
==========================================
Files 80 80
Lines 43469 47658 +4189
Branches 43469 47658 +4189
==========================================
+ Hits 39533 43657 +4124
- Misses 3936 4001 +65
Continue to review full report at Codecov.
|
NetworkGraph
nodes and channels in C bindingsReadOnlyNetworkGraph
Tagging 110 due to user request, plus its trivial |
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.
LGTM, mod two style nits.
ReadOnlyNetworkGraph uses BTreeMap to store its nodes and channels, but these data structures are not supported by C bindings. Expose look-up functions on these maps in lieu of such support.
3024b07
to
2da4953
Compare
ReadOnlyNetworkGraph
usesBTreeMap
to store its nodes and channels, but these data structures are not supported by C bindings. Expose look-up functions on these maps in lieu of such support.