Fixed integer serialization issue with bson. (#287)

This commit is contained in:
Ravin Perera
2021-04-12 07:15:57 +05:30
committed by GitHub
parent 370e03fe84
commit 83bb158dd3
6 changed files with 34 additions and 13 deletions

View File

@@ -745,8 +745,14 @@ namespace msg::usrmsg::json
return -1;
}
input = d[msg::usrmsg::FLD_INPUT].as<std::string>();
nonce = d[msg::usrmsg::FLD_NONCE].as<uint64_t>();
if (nonce == 0)
{
LOG_DEBUG << "Input nonce must be a positive integer.";
return -1;
}
input = d[msg::usrmsg::FLD_INPUT].as<std::string>();
max_ledger_seq_no = d[msg::usrmsg::FLD_MAX_LEDGER_SEQ_NO].as<uint64_t>();
return 0;