NewStoreWithHead is just a wrapper of NewStore that does additional initialization with a given header. Which is fine but at the same time does more than just creating a new store.
I'm proposing to drop this function and add an option to NewStore that can do the same, something like WithInitHeader which will set initial (head) header and as a result NewStore will call Store.Init.
On the other hand just dropping NewStoreWithHead and moving to NewStore + Store.Init will be better to distinguish this two completely different steps.
NewStoreWithHead
is just a wrapper ofNewStore
that does additional initialization with a given header. Which is fine but at the same time does more than just creating a new store.I'm proposing to drop this function and add an option to
NewStore
that can do the same, something likeWithInitHeader
which will set initial (head) header and as a resultNewStore
will callStore.Init
.On the other hand just dropping
NewStoreWithHead
and moving toNewStore
+Store.Init
will be better to distinguish this two completely different steps.Updates #187