rosetta-dogecoin / rosetta-dogecoin

Dogecoin Rosetta API implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[debt] multiple configuration files

patricklodder opened this issue · comments

Describe the issue

With the merge of #19 we now have 2 configurations, one in dogecoin/configuration.go and one in configuration/configuration.go. These files need to be merged.

Proposed resolution

  1. Make sure changes in configuration/configuration.go are reflected in dogecoin/configuration.go
  2. Change imports to use the dogecoin/configuration.go
  3. Remove the ./configuration directory again

Could we put the changes in configuration/configuration.go so we don't need to change the package name in all the files that reference the configuration package?

The problem is caused by the design where both the models and the assigned values are sitting in the same package, in the same file, in particular the values at configuration.go#L53-L83. We solved this with b1559da, where we let the upstream bitcoin package define the struct and enum-like constants, but replaced those constants that are specific to the daemon used.

We can for now keep the tech debt partially and just update ./configuration to reflect the values edited in ./dogecoin, and then fix this permanently when we're done integrating most of it - if that makes it easier for you right now.

Before the last merge, the imports were still from the rosetta-bitcoin repo, so we couldn't import local packages with the same name without causing a collision. We are free to use the configuration package name now.