A new pool's PoolStaged status is checked before it's set
defaultPoolStatus = constAccessor.GetStringValue(constants.DefaultPoolStatus)
This is handler_add_liquidity.go's line 432 (in addLiquidityV96) which sets a new pool's status to PoolStaged from PoolAvailable.
Within validateAddLiquidityMessage:
if pool.Status == PoolStaged && (runeAddr.IsEmpty() || assetAddr.IsEmpty()) {
return fmt.Errorf("cannot add single sided liquidity while a pool is staged")
}
validateAddLiquidityMessage is called in handler_add_liquidity_go's line 416 only (in addLiquidityV96).
Note that line 416 in addLiquidityV96 comes before line 432 in addLiquidityV96, and so a single sided add liquidity which creates a pool is not rejected.
I currently propose that the section which sets a new pool's status be moved out of addLiquidityV and combined with the section which sets a new pool's Asset in handleV.