Loading and saving ledger and lcl consensus. (#51)

* Ledger saving, loading, consensus with ledger sequence number.
* std terminate exception handler.
This commit is contained in:
Asanka Indrajith
2019-11-01 05:51:25 -04:00
committed by Ravin Perera
parent b8ffb83869
commit b598025346
18 changed files with 636 additions and 42 deletions

View File

@@ -142,7 +142,7 @@ std::string get_hash(std::string_view data)
{
unsigned char hashchars[crypto_generichash_BYTES];
crypto_generichash(hashchars, sizeof hashchars, (unsigned char *)data.data(), data.length(), NULL, 0);
return std::string(reinterpret_cast<char *>(hashchars), crypto_hash_sha512_BYTES);
return std::string(reinterpret_cast<char *>(hashchars), crypto_generichash_BYTES);
}
} // namespace crypto