Summary
The /submit_block endpoint in hathor-core can return 200 for errors, with the errors in the response body.
tx-mining-service is relying only in the response status-code to check if something went wrong.
We should make it read the response body when sending requests to /submit_block.
Specifically, we should make sure we treat the case where hathor.manager.HathorManager.submit_block method in hathor-core can return False in the response.
Summary
The
/submit_blockendpoint in hathor-core can return 200 for errors, with the errors in the response body.tx-mining-service is relying only in the response status-code to check if something went wrong.
We should make it read the response body when sending requests to
/submit_block.Specifically, we should make sure we treat the case where
hathor.manager.HathorManager.submit_blockmethod in hathor-core can returnFalsein the response.