aboutsummaryrefslogtreecommitdiff
path: root/src/serialization/crypto.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/serialization/crypto.h')
-rw-r--r--src/serialization/crypto.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/serialization/crypto.h b/src/serialization/crypto.h
index 42bd06e92..d635a9ee9 100644
--- a/src/serialization/crypto.h
+++ b/src/serialization/crypto.h
@@ -47,7 +47,7 @@ bool do_serialize(Archive<false> &ar, std::vector<crypto::signature> &v)
// very basic sanity check
if (ar.remaining_bytes() < cnt*sizeof(crypto::signature)) {
- ar.stream().setstate(std::ios::failbit);
+ ar.set_fail();
return false;
}
@@ -55,7 +55,7 @@ bool do_serialize(Archive<false> &ar, std::vector<crypto::signature> &v)
for (size_t i = 0; i < cnt; i++) {
v.resize(i+1);
ar.serialize_blob(&(v[i]), sizeof(crypto::signature), "");
- if (!ar.stream().good())
+ if (!ar.good())
return false;
}
return true;
@@ -70,7 +70,7 @@ bool do_serialize(Archive<true> &ar, std::vector<crypto::signature> &v)
size_t cnt = v.size();
for (size_t i = 0; i < cnt; i++) {
ar.serialize_blob(&(v[i]), sizeof(crypto::signature), "");
- if (!ar.stream().good())
+ if (!ar.good())
return false;
}
ar.end_string();