Skip to content

[V109-specific] SpawnDerivedAsset: Only emit an EventPoolBalanceChanged if there's a balance change

[V109-specific]

Prompted by seeing the below during a branch's regression testing, endpoint
http://localhost:1317/thorchain/blockevents
.

On reflection, I regret not looking closer at this during !2760 (merged) (which affected the same function)
'When emitting suspension event for Derived Asset pool, check its status rather than the L1 pool's'.

My current impression is that if there is no balance change, there shouldn't be an event emission saying there is.

    {
      "asset": "THOR.BTC",
      "asset_add": "true",
      "asset_amt": "0",
      "reason": "derived pool adjustment",
      "rune_add": "true",
      "rune_amt": "0",
      "type": "pool_balance_change"
    },
    {
      "asset": "THOR.ETH",
      "asset_add": "true",
      "asset_amt": "0",
      "reason": "derived pool adjustment",
      "rune_add": "true",
      "rune_amt": "0",
      "type": "pool_balance_change"
    }
  ],
  "end": [
    {
      "asset": "THOR.BTC",
      "asset_add": "true",
      "asset_amt": "0",
      "reason": "derived pool adjustment",
      "rune_add": "true",
      "rune_amt": "0",
      "type": "pool_balance_change"
    },

Merge request reports