1
0
mirror of https://github.com/bitcoin/bips.git synced 2024-11-19 01:40:05 +01:00

reword transaction outputs in-line with transaction inputs format

This commit is contained in:
Daniel Cousens 2015-08-21 09:07:31 +10:00
parent c6ed18d8b2
commit c60771d229

View File

@ -100,11 +100,11 @@ If the previous output indices match, the inputs are considered equal.
===Transaction Outputs===
A transaction output is defined by its scriptPubKey and amount. [3]
For sorting purposes, we will consider a scriptPubKey in its byte array representation, and a bitcoin amount in terms of their integer number of satoshis (smallest amount ordered first).
For the sake of efficiency, amounts should be compared first for sorting, since they contain fewer bytes of information (8 bytes) compared to a standard P2PKH scriptPubKey (25 bytes). [4]
For the sake of efficiency, amounts will be considered first for sorting, since they contain fewer bytes of information (8 bytes) compared to a standard P2PKH scriptPubKey (25 bytes). [4]
When the values are tied, the scriptPubKey is then considered.
In the event of a tie between scriptPubKeys, sorting is irrelevant since the outputs are exactly equivalent.
Transaction output amounts (as 64-bit unsigned integers) are to be sorted in ascending order.
In the event of two matching output amounts, the respective output scriptPubKeys (in their little-endian, byte-array form) will be compared lexicographically, in ascending order.
If the scriptPubKeys match, the outputs are considered equal.
===Examples===