NethermindEth / near-sffl

https://nffl.nethermind.io/
MIT License
7 stars 7 forks source link

Fix plugin registration and add registration int test #185

Closed Hyodar closed 4 months ago

Hyodar commented 4 months ago

Something that passed us by on #171 - the plugin receivers considered the context would be part of the struct, but it wasn't being assigned on the constructor. For now, I removed the interface, as we're not having much use for it, and made it so the receivers get the context. Saving contexts is a bit weird, so I think this is for the best, and we can get a common interface later. I also added an integration test for opt-in/opt-out operations.

It's important to merge this quickly so we have registering working.

emlautarom1 commented 4 months ago

On the operator-plugin side then the only relevant change is that we no longer store the cli.Context but prefer to pass it as argument when needed. Is this a common Go practice (not storing context?)

Hyodar commented 4 months ago

Exactly - storing contexts is not the norm.