Skip to content

Remove from_json and to_json in Gigamonkey::Bitcoin. MatterPoolAPI is now MatterPool::API#2

Merged
GaeaKat merged 2 commits intoGaeaKat:mainfrom
Gigamonkey-BSV:header
Apr 13, 2021
Merged

Remove from_json and to_json in Gigamonkey::Bitcoin. MatterPoolAPI is now MatterPool::API#2
GaeaKat merged 2 commits intoGaeaKat:mainfrom
Gigamonkey-BSV:header

Conversation

@DanielKrawisz
Copy link
Copy Markdown
Contributor

@DanielKrawisz DanielKrawisz commented Apr 13, 2021

Functions from_json and to_json were here in namespace Gigamonkey::Bitcoin. The problem with this is that bitcoin headers do not have a defined json representation. Gigamonkey::Bitcoin::header is supposed to be just a Bitcoin header, not anything else. Potentially, a different API we use could use a different json representation. Some particular json representation shouldn't be associated with this type.

I have solved this by creating a Cosmos::MatterPool namespace with a type Header that inherents from Gigamonkey::Bitcoin::headers and also has from_json and to_json.

MatterPoolApi is now MatterPool::api and MatterPool_Timechain is now MatterPool::Timechain

@GaeaKat GaeaKat merged commit b20b95c into GaeaKat:main Apr 13, 2021
@DanielKrawisz DanielKrawisz deleted the header branch April 30, 2021 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants