smartcontractkit / external-initiator

Initiate Chainlink job runs from external sources

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clean up logic in FM service

boxhock opened this issue · comments

The FM service currently has a lot of unclear logic that should be cleaned up.

A few of the issues:

  • Too many pointers (it's not clear how big the risk of nil pointer dereferences are)
  • Events from the blockchain manger first goes to one listeners, which interprets the response, which sends the events in a new channel, which is then read by a new listener.

While it was discussed earlier that the blockchain manager sending a single FM state struct would be the best option, I now think that the best solution here is if we have a generic channel in which the blockchain manager sends different types of events defined in the blockchain package. This should reduce the number of pointers used, and hopefully clean up some of the logic in the FM service.

Closed in #108