-
Notifications
You must be signed in to change notification settings - Fork 48
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
Bulk txs outspends #36
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.
Tested ACK @ mempool-electrs 3.0.0-dev-3858f5a
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 should do something about the path naming convention and implement whitelisting in nginx conf
(Same response as #33 )
Otherwise LGTM
Okay but we can rename all the APIs in a separate PR that adds the nginx stuff |
Sure. |
See mempool/mempool#4158 (comment) Change internal API root to |
@mononaut Are you going to change this to /internal as well? |
no, this is the endpoint we want to use in the front end, so it needs to stay publicly accessible. it should be safe enough though, since it's capped at 50 txids per request and fails fast above that (and it'll replace a proxied nodejs endpoint that currently unrolls into 50 separate electrs /outspend requests) |
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.
tested ACK @ [3f877ad]
Augmented the frontend to use /api/txs/outspends
and it works as expected.
Bulk txs outspends
This PR adds a new bulk outspends endpoint at GET
/txs/outspends
, which takes a comma-separated list of up to 50 txids in the?txids
query param, and returns a nested list of outspends.The response matches the format of the equivalent
/api/v1/outspends
API endpoint in the mempool backend, and provides an easy and more efficient replacement for that API call.Note that the query param format is slightly different -- comma-separated values instead of php-style
foo[]=bar
array syntax -- since the latter is awkward to parse.