1
0
Fork 0
forked from lthn/blockchain

check return value of do_serialize in get_attachment_extra_info_details()

This commit is contained in:
sowle 2020-02-17 16:44:11 +03:00
parent 67e416b862
commit bc1152ede5
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -625,7 +625,8 @@ namespace currency
//put hash into extra
std::stringstream ss;
binary_archive<true> oar(ss);
::do_serialize(oar, const_cast<std::vector<attachment_v>&>(attachment));
if (!::do_serialize(oar, const_cast<std::vector<attachment_v>&>(attachment)))
return;
std::string buff = ss.str();
eai.sz = buff.size();
eai.hsh = get_blob_hash(buff);