Skip to content

Commit 7b84d2a

Browse files
committed
add new method: mempool.get_info, and rm redundant relayfee method
1 parent 0466646 commit 7b84d2a

3 files changed

Lines changed: 70 additions & 25 deletions

File tree

docs/protocol-changes.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,3 +207,10 @@ New methods
207207
-----------
208208

209209
* :func:`blockchain.transaction.broadcast_package` to broadcast a package of transactions (submitpackage).
210+
* :func:`mempool.get_info` to get more detailed and general relayfee info.
211+
212+
Removed methods
213+
---------------
214+
215+
* :func:`blockchain.relayfee` is removed. The `minrelaytxfee` field
216+
of the new :func:`mempool.get_info` RPC is a direct replacement.

docs/protocol-methods.rst

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -253,31 +253,6 @@ Subscribe to receive block headers when a new block is found.
253253
block headers to acquire a consistent view of the chain state.
254254

255255

256-
blockchain.relayfee
257-
===================
258-
259-
Feerates lower than this are considered zero fee and are not being
260-
relayed to the bitcoin network by the server.
261-
This feerate does not guarantee acceptance into the mempool of the server.
262-
263-
**Signature**
264-
265-
.. function:: blockchain.relayfee()
266-
267-
**Result**
268-
269-
The feerate in BTC/kvB, as a floating point number.
270-
271-
**Example Results**
272-
273-
::
274-
275-
1e-05
276-
277-
::
278-
279-
0.0
280-
281256
blockchain.scripthash.get_balance
282257
=================================
283258

@@ -903,6 +878,42 @@ pool, weighted by transaction size.
903878
[[59.5, 30324], [40.1, 34305], [35.0, 38459], [29.3, 41270], [27.0, 45167], [24.3, 53512], [22.9, 53488], [21.8, 70279], [20.0, 65328], [18.2, 72180], [18.1, 5254], [18.0, 191579], [16.5, 103640], [15.7, 106715], [15.1, 141776], [14.0, 183261], [13.5, 166496], [11.8, 166050], [11.1, 242436], [9.2, 184043], [7.1, 202137], [5.2, 222011], [4.8, 344788], [4.6, 17101], [4.5, 1696864], [4.1, 598001], [4.0, 32688687], [3.9, 505192], [3.8, 38417], [3.7, 2944970], [3.3, 693364], [3.2, 726373], [3.1, 308878], [3.0, 11884957], [2.6, 996967], [2.3, 822802], [2.2, 9075547], [2.1, 12149801], [2.0, 16387874], [1.4, 873120], [1.3, 3493364], [1.1, 2302460], [1.0, 23204633]]
904879

905880

881+
mempool.get_info
882+
================
883+
884+
Returns details on the active state of the TX memory pool.
885+
886+
**Signature**
887+
888+
.. function:: mempool.get_info()
889+
890+
**Result**
891+
892+
A dictionary with the following keys:
893+
894+
* `mempoolminfee`
895+
* Type: floating point number
896+
* Value:
897+
Dynamic minimum fee rate in BTC/kvB for tx to be accepted given current conditions.
898+
The maximum of minrelaytxfee and minimum mempool fee, in BTC/kvB.
899+
* `minrelaytxfee`
900+
* Type: floating point number
901+
* Value: Static operator-configurable minimum relay fee for transactions, in BTC/kvB.
902+
* `incrementalrelayfee`
903+
* Type: floating point number
904+
* Value: Static operator-configurable minimum fee rate increment for mempool limiting or replacement, in BTC/kvB.
905+
906+
**Example Result**
907+
908+
::
909+
910+
{
911+
"mempoolminfee": 0.00001000,
912+
"minrelaytxfee": 0.00001000,
913+
"incrementalrelayfee": 0.00001000
914+
}
915+
916+
906917
server.add_peer
907918
===============
908919

docs/protocol-removed.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,33 @@ bandwidth-intensive request.
323323
implied starting height will be returned; this may range from zero
324324
to the coin-specific chunk size.
325325

326+
327+
blockchain.relayfee
328+
===================
329+
330+
Feerates lower than this are considered zero fee and are not being
331+
relayed to the bitcoin network by the server.
332+
This feerate does not guarantee acceptance into the mempool of the server.
333+
334+
**Signature**
335+
336+
.. function:: blockchain.relayfee()
337+
338+
**Result**
339+
340+
The feerate in BTC/kvB, as a floating point number.
341+
342+
**Example Results**
343+
344+
::
345+
346+
1e-05
347+
348+
::
349+
350+
0.0
351+
352+
326353
server.version
327354
==============
328355

0 commit comments

Comments
 (0)