Commit b66b8de
committed
refactor: improve group stability, moderation determinism, and DHT dual-stack handling
* DHT Routing: Fixed dual-stack handling to clear stale IPv4/IPv6 associations when a node's address updates.
* Performance: Switched to memcmp for public key/hash comparisons (safe for non-secrets).
* Group Chat Reliability:
* Added logic to use friend connection IPs as a fallback if DHT discovery is slow, with a fix to prevent overwriting existing valid IPs.
* Increased handshake connection limits and fixed full-group sync behavior.
* Enforced list sorting and fixed timestamps to ensure consistent moderation state hashes across all peers.1 parent 4fbd7c1 commit b66b8de
7 files changed
Lines changed: 159 additions & 88 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
591 | 591 | | |
592 | 592 | | |
593 | 593 | | |
594 | | - | |
595 | | - | |
596 | | - | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
597 | 606 | | |
598 | 607 | | |
599 | 608 | | |
| |||
641 | 650 | | |
642 | 651 | | |
643 | 652 | | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | 653 | | |
651 | 654 | | |
652 | 655 | | |
| |||
677 | 680 | | |
678 | 681 | | |
679 | 682 | | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
680 | 688 | | |
681 | 689 | | |
682 | 690 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
146 | | - | |
147 | 145 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | 146 | | |
152 | 147 | | |
153 | 148 | | |
| |||
167 | 162 | | |
168 | 163 | | |
169 | 164 | | |
170 | | - | |
171 | | - | |
172 | 165 | | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | 166 | | |
177 | 167 | | |
178 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3717 | 3717 | | |
3718 | 3718 | | |
3719 | 3719 | | |
| 3720 | + | |
| 3721 | + | |
| 3722 | + | |
| 3723 | + | |
3720 | 3724 | | |
3721 | 3725 | | |
3722 | 3726 | | |
| |||
0 commit comments