-
Notifications
You must be signed in to change notification settings - Fork 420
implements mempool.get_info and clarifies comments of relayfee #302
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
Conversation
105ad84 to
e5bae4d
Compare
|
Leaving a note here that I can also add this to Fulcrum if ElectrumX gets this call merged in ; I’d add it just to make life easier for wallets. |
Adds the `mempool.get_info` rpc to fetch mempoolminfee, minrelaytxfee and incrementalrelayfee from the daemons getmempoolinfo rpc for protocol version 1.6. Updates the relayfee comments as the fee returned by `blockchain.relayfee` doesn't guarantee to get into the mempool as previously stated in the docstrings.
|
Are there other methods added for 1.6 that I should know about ? where is the latest repo for the protocol methods docs maintained ? I figure as long as I’m adding this and bumping it to 1.6 I should implement all of 1.6 for fulcrum edit: never mind found it — you linked to it at top! Ha. |
src/electrumx/server/session.py
Outdated
| if ptuple >= (1, 6, 0): | ||
| handlers['blockchain.transaction.broadcast_package'] = self.package_broadcast | ||
| handlers['mempool.get_info'] = self.mempool_info | ||
| else: | ||
| handlers['blockchain.relayfee'] = self.relayfee # removed in 1.6 |
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.
self-note: the PR does not bump PROTOCOL_MAX, which is good, as that means protocol 1.6 is not exposed and we can merge this without implementing all of 1.6, or merge it before 1.6 is finalised.
electrumx/src/electrumx/server/session.py
Line 1039 in f72b3e8
| PROTOCOL_MAX = (1, 4, 3) |
Guards the new `blockchain.transaction.broadcast_package` and `mempool.get_info` methods of protocol 1.6 behind this versions ptuple in `set_request_handlers` so they are only exposed in protocol versions >= 1.6. Also stops exposing the `blockchain.relayfee` endpoint for version >= 1.6 as it got removed in 1.6.
|
Looks good. Thanks! |
This implements the remainder of the protocol 1.6 changes, and it bumps PROTOCOL_MAX to "1.6". Some of protocol 1.6 was merged previously, see e.g.: - #288 - #302 - kyuupichan/electrumx#1001 - #325 ref spesmilo/electrum-protocol#6 ref #317
Adds the
mempool.get_inforpc to fetch mempoolminfee, minrelaytxfeeand incrementalrelayfee from the daemons getmempoolinfo rpc.
Updates the relayfee comments as the fee returned by
blockchain.relayfeedoesn't guarantee to get into the mempool aspreviously stated in the docstrings.
Part of spesmilo/electrum-protocol#6