Edge reintroduction was happening while reintroducing parallel edges, which was confusing everything
IXC43DSHDSXCE2X6H6N47GGVKTYM2D2BUUWF34CFWMFT6Z45NOOAC
I24UEJQLCH2SOXA4UHIYWTRDCHSOPU7AFTRUOTX7HZIAV4AZKYEQC
YN63NUZO4LVJ7XPMURDULTXBVJKW5MVCTZ24R7Z52QMHO3HPDUVQC
SXEYMYF7P4RZMZ46WPL4IZUTSQ2ATBWYZX7QNVMS3SGOYXYOHAGQC
6YMDOZIB5LVYLFIDGN2WNT5JTHEAMS4TFPVDEZ3OWXWOKJOC5QDAC
VO5OQW4W2656DIYYRNZ3PO7TQ4JOKQ3GVWE5ALUTYVMX3WMXJOYQC
CCLLB7OIFNFYJZTG3UCI7536TOCWSCSXR67VELSB466R24WLJSDAC
23LVKATNTT74YKHG7KJM6SBO2IVZEV24TQ46ZJIHQ2IXONWNVXJAC
ws.must_reintroduce.clear();
for n in newedges.edges.iter() {
let mut source = crate::apply::edge::find_source_vertex(txn, channel, &n.from, change_id, newedges.inode, n.flag, &mut ws.apply)?;
let mut target = crate::apply::edge::find_target_vertex(txn, channel, &n.to, change_id, newedges.inode, n.flag, &mut ws.apply)?;
loop {
let intro_ext = n.introduced_by.unwrap_or(ext);
let intro = internal(txn, &n.introduced_by, change_id)?.unwrap();
if must_reintroduce(txn, channel, changes, source, target, intro_ext, intro, change_id)? {
ws.must_reintroduce.insert((source, target));
}
if target.end >= n.to.end {
break;
}
source = target;
target = *txn
.find_block(channel, target.end_pos())
.map_err(UnrecordError::from)?;
assert_ne!(source, target);
}
}
let reintro = std::mem::take(&mut ws.must_reintroduce);
|txn, channel, a, b| {
must_reintroduce(txn, channel, changes, a, b, ext, intro, change_id)
},
|a, b| reintro.contains(&(a, b)),