]> git.bitcoin.ninja Git - rust-lightning/commit
Use a total lockorder for `NetworkGraph`'s `PartialEq` impl
authorDuncan Dean <git@dunxen.dev>
Tue, 9 May 2023 09:44:48 +0000 (11:44 +0200)
committerDuncan Dean <git@dunxen.dev>
Tue, 23 May 2023 20:51:22 +0000 (22:51 +0200)
commit6418a86e5176229b9719155a2b9a640d4e0c1175
tree5170f4926d70af3f1d4e1496294560d150d20fdb
parent6775b957bc0e738afff46eb819c69f45410f1843
Use a total lockorder for `NetworkGraph`'s `PartialEq` impl

`NetworkGraph`'s `PartialEq` impl before this commit was deadlock-prone.
Similarly to `ChannelMonitor`'s, `PartialEq` impl, we use position in
memory for a total lockorder. This uses the assumption that the objects
cannot move within memory while the inner locks are held.
lightning/src/routing/gossip.rs