Commit 5379fce
refactor: add CDeterministicMNList::IsEqual method
Add method to compare two masternode lists for equality while ignoring
non-deterministic members (nTotalRegisteredCount, internalId).
Non-deterministic members can differ between nodes due to different sync
histories but don't affect consensus validity. This method is useful for
verifying that masternode list states match after applying diffs.
Key features:
- Compares blockHash, nHeight, and mnUniquePropertyMap
- Compares map sizes (but not nTotalRegisteredCount)
- Iterates through all masternodes comparing deterministic fields
- Uses SerializeHash for pdmnState to avoid enumerating all fields
Co-authored-by: Claude (Anthropic AI) <[email protected]>1 parent 496ed89 commit 5379fce
1 file changed
+40
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
439 | 479 | | |
440 | 480 | | |
441 | 481 | | |
| |||
0 commit comments