iotaledger / iota-core

Apache License 2.0
59 stars 12 forks source link

Fix: Prevent spawning of unnecessary chains #940

Closed hmoog closed 2 months ago

hmoog commented 2 months ago

This PR build on top of: https://github.com/iotaledger/iota-core/pull/939 and fixes a problem where we created a short living chain for newly produced engine commitments that replace an already existing commitment extending the same chain.

The problem is fixed by registering ourselves as the main child of our parent (forceChain) before we initialize the behavior of the commitment (so it doesn't prematurely determine its chain).