ChainSafe / gossamer

🕸️ Go Implementation of the Polkadot Host
https://chainsafe.github.io/gossamer
GNU Lesser General Public License v3.0
427 stars 110 forks source link

Refactor SlotState to use local interface for DB access #3972

Open EmilGeorgiev opened 1 month ago

EmilGeorgiev commented 1 month ago

Issue summary

The type SlotState has a field db of type database.Table

type SlotState struct {
    db database.Table
}

The interface Table has several methods but the type 'SlotState' use only 'Get' and 'NewBatch' it is better to define a local interface. I explained why in this issue: #3971

Related issues:

3975

EmilGeorgiev commented 3 weeks ago

If you think this makes sense, can I take this issue?