mirror of
https://github.com/corda/corda.git
synced 2025-01-08 14:03:06 +00:00
fix order-of-operations bug in compile loop
The code was capturing branch snapshots too early - before the call to populateSources which might perform further moves.
This commit is contained in:
parent
ef00ff80ef
commit
ed4206b06d
@ -5182,8 +5182,6 @@ populateSiteTables(Context* c, Event* e, SiteRecordList* frozen)
|
|||||||
resolveJunctionSites(c, e, frozen);
|
resolveJunctionSites(c, e, frozen);
|
||||||
|
|
||||||
resolveBranchSites(c, e, frozen);
|
resolveBranchSites(c, e, frozen);
|
||||||
|
|
||||||
captureBranchSnapshots(c, e);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -5452,12 +5450,17 @@ compile(Context* c)
|
|||||||
|
|
||||||
populateSources(c, e);
|
populateSources(c, e);
|
||||||
|
|
||||||
|
if (branch and e->successors) {
|
||||||
|
captureBranchSnapshots(c, e);
|
||||||
|
}
|
||||||
|
|
||||||
thaw(c, &frozen);
|
thaw(c, &frozen);
|
||||||
|
|
||||||
e->compile(c);
|
e->compile(c);
|
||||||
|
|
||||||
if ((not branch) and e->successors) {
|
if ((not branch) and e->successors) {
|
||||||
populateSiteTables(c, e, &frozen);
|
populateSiteTables(c, e, &frozen);
|
||||||
|
captureBranchSnapshots(c, e);
|
||||||
thaw(c, &frozen);
|
thaw(c, &frozen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user