Returned input hash and ledger info for input submissions. (#283)

- Introduced input hash which can later be used to query the ledger.
- Returned input hash and ledger info at input submission.
- Updated js client lib to support input hash.
- Updated consensus proposal candidate expiration rules.
This commit is contained in:
Ravin Perera
2021-04-07 21:22:29 +05:30
committed by GitHub
parent 137d7633e0
commit d4646179c2
33 changed files with 668 additions and 393 deletions

View File

@@ -24,7 +24,7 @@ namespace ledger::sqlite
"state_hash, patch_hash, user_hash, input_hash, output_hash"
") VALUES(?,?,?,?,?,?,?,?,?,?)";
#define BIND_H32_BLOB(idx, field) (sqlite3_bind_blob(stmt, idx, field.data(), sizeof(util::h32), SQLITE_STATIC) == SQLITE_OK)
#define BIND_H32_BLOB(idx, field) (field.size() == sizeof(util::h32) && sqlite3_bind_blob(stmt, idx, field.data(), sizeof(util::h32), SQLITE_STATIC) == SQLITE_OK)
#define GET_H32_BLOB(idx) std::string((char *)sqlite3_column_blob(stmt, idx), sizeof(util::h32))
/**