FactomProject / factom

Library for writing Factom clients in go
MIT License
44 stars 19 forks source link

Make raw data optional in API Requests #137

Closed WhoSoup closed 4 years ago

WhoSoup commented 4 years ago

Tandem PR with https://github.com/FactomProject/factomd/pull/996

This adds functions to the API to retrieve the various blocks without the raw component, making use of the above PR. Ideally, both are merged but this PR will work on its own, it just won't be any more efficient.

Each GetXBlock and GetXBlockByHeight function has a GetSimpleXBlock and GetSimpleXBlockByHeight counterpart with a different return signature. There are unit tests for all functions that check the return value is identical.

WhoSoup commented 4 years ago

Reworked to remove raw requests and changed base to develop.