Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Commit

Permalink
Added debug info to failures when storing persistent state (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
paularchard committed Mar 20, 2019
1 parent 24ba571 commit 6754f61
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pbft/pbft_persistent_state.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,14 @@ namespace bzn
else
{
t = default_value;
auto result = this->storage->create(STATE_UUID, this->key, to_string(t));
auto val = to_string(t);
auto result = this->storage->create(STATE_UUID, this->key, val);
if (result != storage_result::ok)
{
LOG(error) << "Failed to initialize value in storage - result: " << static_cast<uint64_t>(result)
<< " key: " << this->key
<< " value size: " << val.size()
<< " value: " << val.substr(0, MAX_MESSAGE_SIZE);
throw std::runtime_error("Error initializing value in storage");
}
}
Expand Down

0 comments on commit 6754f61

Please sign in to comment.