Fixed consensus issues with large no. of users and inputs. (#280)

* Fixed issue in consensus contract output  sorting.

* Improved load test script.

* Removed flatbuffer verifier restrictions to support large no. of users and inputs.

* Improved consensus proposal cleanup.

* Restored the earlier proposal cleanup logic.

* Minor fixes.

* const fix.
This commit is contained in:
Ravin Perera
2021-04-01 17:12:39 +05:30
committed by GitHub
parent af48f3b01f
commit bba5266f5d
4 changed files with 33 additions and 24 deletions

View File

@@ -61,10 +61,15 @@ namespace util
std::ostream &operator<<(std::ostream &output, const h32 &h)
{
const std::ios_base::fmtflags stream_flags(output.flags());
output << std::hex;
const uint8_t *buf = reinterpret_cast<const uint8_t *>(&h);
for (int i = 0; i < 5; i++) // Only print first 5 bytes in hex.
output << std::hex << std::setfill('0') << std::setw(2) << (int)buf[i];
output << std::setfill('0') << std::setw(2) << (int)buf[i];
// Reset the ostream flags because we set std::hex at the begining.
output.flags(stream_flags);
return output;
}