-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from kostaleonard/blockchain-verify
Adds blockchain serialization and deserialization
- Loading branch information
Showing
26 changed files
with
1,144 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
|
||
build | ||
scrap | ||
tests/output | ||
|
||
### C ### | ||
# Prerequisites | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* @brief Defines functions for working with endianness. | ||
*/ | ||
|
||
#ifndef INCLUDE_ENDIAN_H_ | ||
#define INCLUDE_ENDIAN_H_ | ||
#include <stdint.h> | ||
|
||
/** | ||
* @brief Returns the big endian representation of data. | ||
* | ||
* @param data A 64 bit piece of data. Its endianness does not matter. | ||
* @return uint64_t The big endian representation of data. | ||
*/ | ||
uint64_t htobe64(uint64_t data); | ||
|
||
/** | ||
* @brief Returns the host representation of big endian data. | ||
* | ||
* @param data A 64 bit piece of data in big endian representation. | ||
* @return uint64_t The host representation of data. | ||
*/ | ||
uint64_t betoh64(uint64_t data); | ||
|
||
#endif // INCLUDE_ENDIAN_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.