Renaming nano::vote::deserialize result' to
error' to match the semantics of what's being returned and added documentation to function.
This commit is contained in:
parent
aeed10f48b
commit
b5099ff0de
2 changed files with 7 additions and 3 deletions
|
@ -591,7 +591,7 @@ void nano::vote::serialize (nano::stream & stream_a) const
|
|||
|
||||
bool nano::vote::deserialize (nano::stream & stream_a)
|
||||
{
|
||||
auto result = false;
|
||||
auto error = false;
|
||||
try
|
||||
{
|
||||
nano::read (stream_a, account.bytes);
|
||||
|
@ -607,9 +607,9 @@ bool nano::vote::deserialize (nano::stream & stream_a)
|
|||
}
|
||||
catch (std::runtime_error const &)
|
||||
{
|
||||
result = true;
|
||||
error = true;
|
||||
}
|
||||
return result;
|
||||
return error;
|
||||
}
|
||||
|
||||
bool nano::vote::validate () const
|
||||
|
|
|
@ -267,6 +267,10 @@ public:
|
|||
bool operator!= (nano::vote const &) const;
|
||||
void serialize (nano::stream &) const;
|
||||
void serialize_json (boost::property_tree::ptree & tree) const;
|
||||
/**
|
||||
* Deserializes a vote from the bytes in `stream'
|
||||
* Returns true if there was an error
|
||||
*/
|
||||
bool deserialize (nano::stream &);
|
||||
bool validate () const;
|
||||
boost::transform_iterator<nano::iterate_vote_blocks_as_hash, nano::vote_blocks_vec_iter> begin () const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue