various tweaks, combine payloads in ImportTx

This commit is contained in:
Scott Sadler
2018-04-06 13:37:56 -03:00
parent aa9eec4522
commit 56cf273faf
7 changed files with 67 additions and 73 deletions

View File

@@ -134,6 +134,9 @@ bool Eval::CheckNotaryInputs(const CTransaction &tx, uint32_t height, uint32_t t
}
extern char ASSETCHAINS_SYMBOL[16];
bool NotarisationData::Parse(const CScript scriptPK)
{
*this = NotarisationData();
@@ -146,12 +149,14 @@ bool NotarisationData::Parse(const CScript scriptPK)
try {
ss >> blockHash;
ss >> height;
if (ASSETCHAINS_SYMBOL[0])
ss >> txHash;
char *nullPos = (char*) memchr(&ss[0], 0, ss.size());
if (!nullPos) return false;
ss.read(symbol, nullPos-&ss[0]+1);
if (ss.size() != 36) return false;
if (ss.size() < 36) return false;
ss >> MoM;
ss >> MoMDepth;
} catch (...) {