mirror of
https://github.com/monero-project/monero.git
synced 2025-12-10 21:44:25 -05:00
serialization: check stream good flag at the end
just in case
This commit is contained in:
parent
a00cabd4f3
commit
1387549e90
3 changed files with 6 additions and 6 deletions
|
|
@ -252,7 +252,7 @@ namespace rct {
|
|||
{
|
||||
FIELD(type)
|
||||
if (type == RCTTypeNull)
|
||||
return true;
|
||||
return ar.stream().good();
|
||||
if (type != RCTTypeFull && type != RCTTypeSimple && type != RCTTypeBulletproof && type != RCTTypeBulletproof2)
|
||||
return false;
|
||||
VARINT_FIELD(txnFee)
|
||||
|
|
@ -312,7 +312,7 @@ namespace rct {
|
|||
ar.delimit_array();
|
||||
}
|
||||
ar.end_array();
|
||||
return true;
|
||||
return ar.stream().good();
|
||||
}
|
||||
};
|
||||
struct rctSigPrunable {
|
||||
|
|
@ -325,7 +325,7 @@ namespace rct {
|
|||
bool serialize_rctsig_prunable(Archive<W> &ar, uint8_t type, size_t inputs, size_t outputs, size_t mixin)
|
||||
{
|
||||
if (type == RCTTypeNull)
|
||||
return true;
|
||||
return ar.stream().good();
|
||||
if (type != RCTTypeFull && type != RCTTypeSimple && type != RCTTypeBulletproof && type != RCTTypeBulletproof2)
|
||||
return false;
|
||||
if (type == RCTTypeBulletproof || type == RCTTypeBulletproof2)
|
||||
|
|
@ -429,7 +429,7 @@ namespace rct {
|
|||
}
|
||||
ar.end_array();
|
||||
}
|
||||
return true;
|
||||
return ar.stream().good();
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue