-
Notifications
You must be signed in to change notification settings - Fork 80
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
Implement chain::Access
trait
#21
Conversation
3cc9695
to
dd97b78
Compare
Blocked on bitcoindevkit/rust-esplora-client#8, so currently based on my |
dd97b78
to
30ed951
Compare
The change has been merged now, so not blocked anymore. |
f242dff
to
aec3a52
Compare
// position, and finally feed them to the interface in order. | ||
confirmed_txs.sort_unstable_by( | ||
|(_, block_height1, _, pos1), (_, block_height2, _, pos2)| { | ||
block_height1.cmp(&block_height2).then_with(|| pos1.cmp(&pos2)) |
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.
Could also be implemented using sort_unstable_by_key
: getlipa/lipa-lightning-lib@b2f521d
This reverts commit fdef833.
Here we migrate from wrapping all upstream errors to exposing only select error variants to the downstream user. Also, we clean up and unify logging outputs.
aec3a52
to
c384381
Compare
Rebased on #26. |
We migrate BDK and other remaining blocking parts to async.
c384381
to
5420711
Compare
} | ||
} | ||
|
||
impl<D> Access for ChainAccess<D> |
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 don't think we want to do this. Access
doesn't really make sense to implement unless we're querying a local store, so implementing it for something other than local RPC/REST seems like we're sending the wrong signal.
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.
Hm, I agree this is kind of counter-intuitive in the mobile case when we aim to default to the RGS + Electrum/Esplora model. However, as we probably soon add a server mode where we will default to P2P + Bitcoind', it may be awkward not to cover all options, i.e., allow to switch to P2P + Electrum/Esplora, if the user really wanted that for some reason?
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 don't think "cover all the bases" is a goal? Like, I guess the question is do we expect someone to be running on a "server" without a local bitcoind? Or, I suppose, do we want to support that - I'd strongly suggest a hard no. If you're running a large forwarding node you must run your own bitcoind, and we shouldn't support anything else.
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.
Alright, fair enough. Will close this for now and just implement Access
vs bitcoind in the future 'server mode' feature.
Based on
#8, #9, #10, #11.Funnily enough I so far had overlooked implementing
chain::Access
. This PR fills this gap.