mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
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:
@@ -15,7 +15,7 @@ namespace usr
|
||||
* 1 if nonce has expired.
|
||||
* 2 if message with same nonce/sig has already been submitted.
|
||||
*/
|
||||
int input_nonce_map::check(const std::string &pubkey, const std::string &nonce, const std::string &sig, const uint64_t &max_lcl_seq_no, const bool no_add)
|
||||
int input_nonce_map::check(const std::string &pubkey, const std::string &nonce, const std::string &sig, const uint64_t &max_ledger_seq_no, const bool no_add)
|
||||
{
|
||||
int result = 0;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace usr
|
||||
{
|
||||
result = 0;
|
||||
if (!no_add)
|
||||
nonce_map.emplace(pubkey, std::tuple<std::string, std::string, uint64_t>(nonce, sig, max_lcl_seq_no));
|
||||
nonce_map.emplace(pubkey, std::tuple<std::string, std::string, uint64_t>(nonce, sig, max_ledger_seq_no));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -38,7 +38,7 @@ namespace usr
|
||||
if (!no_add)
|
||||
{
|
||||
std::get<0>(itr->second) = nonce;
|
||||
std::get<2>(itr->second) = max_lcl_seq_no;
|
||||
std::get<2>(itr->second) = max_ledger_seq_no;
|
||||
}
|
||||
result = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user