fanquake
17fdbefd3f
Merge bitcoin/bitcoin#23970 : Remove pointless and confusing shift in RelayAddress
...
fa9f4554ca refactor: Remove pointless and confusing shift in RelayAddress (MarcoFalke)
Pull request description:
The second argument written to the siphash is already quantized to 24 hours, so it seems confusing to quantize the first argument to 32 bits (out of 64 bits).
> The shifting is pointless, we should get rid of it. It seems to be a silly evolution of this 2010 Satoshi code: 5cbf753 (where it made sense because everything was XORed together, and the address used the high bits, while the time used the low ones).
(Copied from https://github.com/bitcoin/bitcoin/pull/18642#issuecomment-613773120 )
(The original code was `uint256 hashRand = hashSalt ^ (((int64)addr.ip)<<32) ^ ((GetTime()+addr.ip)/(24*60*60));`)
This also allows to remove a integer sanitizer suppression for the whole file.
ACKs for top commit:
laanwj:
Code review ACK fa9f4554ca
sipa:
utACK fa9f4554ca
promag:
Code review ACK fa9f4554ca .
Tree-SHA512: f5fd107464ccd839d6749aed6914b4935e39ab42906546b3f3810a7339fc4633fef931a1783a287572af5ec64525626fa91d147d8ff52eb076740465bf5cf839
2022-01-06 07:35:01 +08:00
..
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-09-29 14:10:29 +02:00
2021-12-30 19:36:57 +02:00
2022-01-05 10:34:29 +01:00
2021-12-22 13:44:55 -05:00
2021-12-30 19:36:57 +02:00
2021-10-05 11:10:47 -04:00
2021-12-30 19:36:57 +02:00
2021-10-21 09:36:07 +08:00
2022-01-05 10:41:16 -03:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2022-01-04 12:55:29 +02:00
2022-01-05 11:40:57 +01:00
2022-01-01 00:26:08 +13:00
2021-12-15 09:19:50 -05:00
2021-12-30 19:36:57 +02:00
2022-01-05 15:32:53 +01:00
2021-10-11 20:45:56 +08:00
2022-01-05 15:32:53 +01:00
2022-01-05 19:16:28 +01:00
2021-12-30 19:36:57 +02:00
2021-11-12 11:46:34 +01:00
2021-09-07 09:11:10 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-28 21:54:51 +01:00
2022-01-04 23:08:11 +08:00
2022-01-04 23:08:11 +08:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-06 14:17:41 +13:00
2021-12-06 14:17:41 +13:00
2021-12-30 19:36:57 +02:00
2022-01-05 17:48:55 +01:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-11-26 11:17:43 +01:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2022-01-04 15:35:42 +01:00
2021-11-29 14:32:51 +01:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-08-24 11:30:09 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-17 10:46:39 +01:00
2021-09-24 15:40:04 +08:00
2021-10-15 01:02:45 +00:00
2021-10-21 09:37:30 +08:00
2021-12-13 19:27:46 +01:00
2021-12-13 19:24:33 +01:00
2021-09-15 15:46:48 -04:00
2021-12-17 16:56:05 +01:00
2021-10-11 20:46:25 +08:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2022-01-04 17:07:29 +01:00
2021-12-30 19:36:57 +02:00
2021-12-14 18:58:45 +01:00
2021-12-30 19:36:57 +02:00
2022-01-05 15:32:53 +01:00
2022-01-05 15:32:53 +01:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2022-01-02 08:37:12 +08:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2022-01-03 14:34:39 +01:00
2022-01-03 14:34:39 +01:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2022-01-04 10:49:38 +08:00
2022-01-02 17:05:14 +01:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00