mirror of
https://github.com/luxfi/bridge.git
synced 2026-09-24 00:26:46 +00:00
Starting the bridge without MPC configured killed the process with a nil pointer dereference in release-pool bootstrap. The guard it was supposed to hit was already there, and already said the useful thing: "cannot grow 0→10 without Keygener (mpc client not configured)". It could not fire. mchainClient is declared as *mchain.Client and assigned only when MPC is configured, so without it the variable is a nil pointer — and a nil pointer passed into an interface parameter produces an interface that is not nil, because it carries a type. `kg == nil` is false, the next line calls a method on nothing, and the process dies where a sentence had been written for exactly this case. Five call sites now pass keygener(mchainClient), which returns a genuinely nil interface when there is no client. Running without MPC is an ordinary local case; it now says so and carries on to the next pool instead of taking the process down.