mirror of
https://github.com/status-im/sourcecred.git
synced 2025-02-06 17:53:38 +00:00
* PagerankGraph: Add toJSON/fromJSON This commit adds serialization logic to `PagerankGraph`. As with many things in PagerankGraph, it's based on the corresponding logic in `Graph`. Much like graph, it stores data associated with nodes and edges (in this case, the scores and edge weights) in an ordered array rather than a map, so as to avoid repetitiously serializing the node and edge addresses. Test plan: Unit tests added, and they should be sufficient. Also take a look at the included snapshot.