Send the second last block difficulty sum

This counters a possible attack where a miner could try to replace an
already mined block with a different one that appears to be mined just
one second before.
This commit is contained in:
2024-02-25 00:55:47 +01:00
parent bd51b5efff
commit c4942dd716
2 changed files with 3 additions and 3 deletions

View File

@@ -77,11 +77,11 @@ If the list contains less than 1024 entries, set "transaction fee", "sender pubk
| protocol version = 0 (BE) | 2 |
| capable version = 0 (BE) | 2 |
| type = 0 (BE) | 1 |
| difficulty sum of last known block (BE) | 32 |
| difficulty sum of second last known block (BE) | 32 |
| hash value of open transaction # 1023 | 32 |
| partner IPv6 | 16 |
| partner port (BE) | 2 |
The difficulty sum is sent as 0 if no block is known.
The difficulty sum is sent as 2^28 if only one block is known or as 0 if no block is known.
partner IPv6 and partner port may be nullbytes (no partner included).