Skip to content

Commit

Permalink
accommodate some review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
SomberNight committed Jan 8, 2021
1 parent c0a6ddf commit adba763
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/protocol-basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,15 @@ txid (in network byteorder) is used to arrive at a canonical ordering.
(reverse of human display endianness)

* ``height`` is the height of the block the tx is included in,
serialised as 8-bytes, little-endian, signed (two's complement)
serialised as 4-bytes, little-endian, signed (two's complement)

6. For each mempool tx, form a bytearray: ``tx_hash+height+fee``, where:

* ``tx_hash`` is the 32-byte transaction hash in network byteorder
(reverse of human display endianness)

* ``height`` is either ``0`` or ``-1``, as defined above,
serialised as 8-bytes, little-endian, signed (two's complement)
serialised as 4-bytes, little-endian, signed (two's complement)

* ``fee`` is the transaction fee in minimum coin units (satoshis),
serialised as 8-bytes, little-endian, unsigned
Expand Down
18 changes: 14 additions & 4 deletions docs/protocol-methods.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ be confirmed within a certain number of blocks.
*mode*

A string to pass to the bitcoind *estimatesmartfee* RPC as the
*estimate_mode* parameter. Optional.
*estimate_mode* parameter. Optional. If omitted, the corresponding
parameter to the bitcoind RPC is also omitted, i.e. the default
value is determined by bitcoind.

**Result**

Expand Down Expand Up @@ -576,7 +578,7 @@ as an input (spends it).

**Signature**

.. function:: blockchain.outpoint.subscribe(tx_hash, txout_idx)
.. function:: blockchain.outpoint.subscribe(tx_hash, txout_idx, spk_hint=None)
.. versionadded:: 1.5

*tx_hash*
Expand All @@ -588,6 +590,12 @@ as an input (spends it).

The output index, a non-negative integer. (sometimes called prevout_n, in inputs)

*spk_hint*

The scriptPubKey (output script) corresponding to the outpoint, as a hexadecimal
string. This is optional, and if provided might be used by the server to find
the outpoint. The behaviour is undefined if an incorrect value is provided.

**Result**

The status of the TXO, taking the mempool into consideration.
Expand All @@ -596,7 +604,8 @@ as an input (spends it).
* *height*

The integer height of the block the funding transaction was confirmed in.
``0`` if the funding transaction is in the mempool.
If the funding transaction is in the mempool; the value is
``0`` if all its inputs are confirmed, and ``-1`` otherwise.
This key must be present if and only if there exists a funding transaction
(either in the best chain or in the mempool), regardless of spentness.

Expand All @@ -609,7 +618,8 @@ as an input (spends it).
* *spender_height*

The integer height of the block the spending transaction was confirmed in.
``0`` if the spending transaction is in the mempool.
If the spending transaction is in the mempool; the value is
``0`` if all its inputs are confirmed, and ``-1`` otherwise.
This key is present if and only if the *spender_txhash* key is present.


Expand Down

0 comments on commit adba763

Please sign in to comment.