Final non-breaking changes to serializer classes. Extra set helper functions.

This commit is contained in:
JoelKatz
2012-03-26 11:43:26 -07:00
parent 39ce609a54
commit 649e1fda37
4 changed files with 139 additions and 3 deletions

View File

@@ -16,7 +16,8 @@ SerializedTransaction::SerializedTransaction(TransactionType type)
SerializedTransaction::SerializedTransaction(SerializerIterator& sit, int length)
{
if(length==0) length=sit.get32();
if(length==-1) length=sit.getBytesLeft();
else if(length==0) length=sit.get32();
if( (length<TransactionMinLen) || (length>TransactionMaxLen) )
throw(std::runtime_error("Transaction length invalid"));