From f9eaf192b43baee2d13ce9552ad63235de072b0b Mon Sep 17 00:00:00 2001 From: dimxy Date: Thu, 18 Apr 2019 20:55:59 +0500 Subject: [PATCH] burn tx isEof check added --- src/importcoin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/importcoin.cpp b/src/importcoin.cpp index d1b317425..d378aeec6 100644 --- a/src/importcoin.cpp +++ b/src/importcoin.cpp @@ -206,11 +206,13 @@ bool UnmarshalBurnTx(const CTransaction &burnTx, std::string &targetSymbol, uint if (vburnOpret.begin()[0] == EVAL_IMPORTCOIN) { uint8_t evalCode; + bool isEof = true; return E_UNMARSHAL(vburnOpret, ss >> evalCode; ss >> VARINT(*targetCCid); ss >> targetSymbol; ss >> payoutsHash; - ss >> rawproof); + ss >> rawproof; isEof = ss.eof();) || !isEof; // if isEof == false it means we successfully read add the data + // and it might be additional data further that we do not need here } else { LOGSTREAM("importcoin", CCLOG_INFO, stream << "UnmarshalBurnTx() invalid eval code in opret" << std::endl);