koinos / koinos-types

The Rosetta Stone of the Koinos ecosystem. Allows for the interpretation of Koinos data structures in a multitude of languages. Useful in the development of microservices, clients, and smart contracts.
MIT License
12 stars 3 forks source link

Multihash JSON should be a string, not an object #159

Closed theoreticalbts closed 3 years ago

theoreticalbts commented 3 years ago

Closes #153.

I put the new multihash implementation in separate header files because we've created a dependency between binary.hpp and json.hpp. JSON really only needs the binary serializations needed to serialize multihashes, but separating the existing different types into their own headers is a huge refactoring way outside this ticket. So I compromised by putting the new multihash code in its own header. We may want to look at this later.

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 666


Changes Missing Coverage Covered Lines Changed/Added Lines %
tests/cpp/src/json_pack_test.cpp 9 10 90.0%
<!-- Total: 9 10 90.0% -->
Files with Coverage Reduction New Missed Lines %
build/generated/cpp/include/koinos/pack/rt/binary.hpp 2 99.13%
build/generated/golang/src/github.com/koinos/koinos-types-golang/basetypes.go 2 99.75%
build/generated/cpp/include/koinos/pack/rt/json.hpp 7 94.36%
<!-- Total: 11 -->
Totals Coverage Status
Change from base Build 661: -0.05%
Covered Lines: 7978
Relevant Lines: 8024

💛 - Coveralls
theoreticalbts commented 3 years ago

Rebasing on latest master.