You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Bitcoin Core source code has `VARINT` type which is different than
the "variable integer" format used all over the P2P protocol and also
for the "services" field in this BIP. The latter is called `CompactSize`
in some BIPs and also in the Bitcoin Core source code, thus use the word
`CompactSize` to refer to it and link to its documentation.
Copy file name to clipboardExpand all lines: bip-0155.mediawiki
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ The <code>addrv2</code> message is defined as a message where <code>pchCommand =
46
46
It is serialized in the standard encoding for P2P messages.
47
47
Its format is similar to the current <code>addr</code> message format
48
48
<ref>[https://bitcoin.org/en/developer-reference#addr Bitcoin Developer Reference: addr message]</ref>, with the difference that the
49
-
fixed 16-byte IP address is replaced by a network ID and a variable-length address, and the services format has been changed to VARINT.
49
+
fixed 16-byte IP address is replaced by a network ID and a variable-length address, and the services format has been changed to [https://en.bitcoin.it/wiki/Protocol_documentation#Variable_length_integer CompactSize].
50
50
51
51
This means that the message contains a serialized <code>std::vector</code> of the following structure:
52
52
@@ -59,9 +59,9 @@ This means that the message contains a serialized <code>std::vector</code> of th
59
59
| <code>time</code>
60
60
| Time that this node was last seen as connected to the network. A time in Unix epoch time format.
61
61
|-
62
-
| <code>VARINT</code> (unsigned)
62
+
| <code>CompactSize</code>
63
63
| <code>services</code>
64
-
| Service bits. A 64-wide bit field.
64
+
| Service bits. A bit field that is 64 bits wide, encoded in [https://en.bitcoin.it/wiki/Protocol_documentation#Variable_length_integer CompactSize].
65
65
|-
66
66
| <code>uint8_t</code>
67
67
| <code>networkID</code>
@@ -142,7 +142,7 @@ The reference implementation is available at (to be done)
142
142
143
143
==Acknowledgements==
144
144
145
-
- Jonas Schnelli: change <code>services</code> field to VARINT, to make the message more compact in the likely case instead of always using 8 bytes.
145
+
- Jonas Schnelli: change <code>services</code> field to [https://en.bitcoin.it/wiki/Protocol_documentation#Variable_length_integer CompactSize], to make the message more compact in the likely case instead of always using 8 bytes.
146
146
147
147
- Gregory Maxwell: various suggestions regarding extensibility
0 commit comments