From 379e23fcec151742aa04c8d80d297821957db1da Mon Sep 17 00:00:00 2001 From: Scott Sadler Date: Thu, 31 May 2018 15:19:46 -0300 Subject: [PATCH] allow TXSCL notarisations without notary inputs --- src/notarisationdb.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/notarisationdb.cpp b/src/notarisationdb.cpp index 18b9da685..3087a563f 100644 --- a/src/notarisationdb.cpp +++ b/src/notarisationdb.cpp @@ -19,10 +19,24 @@ NotarisationsInBlock GetNotarisationsInBlock(const CBlock &block, int nHeight) for (unsigned int i = 0; i < block.vtx.size(); i++) { CTransaction tx = block.vtx[i]; - if (eval->CheckNotaryInputs(tx, nHeight, block.nTime)) { + + // Special case for TXSCL. Should prob be removed at some point. + bool isTxscl = 0; + { NotarisationData data; if (ParseNotarisationOpReturn(tx, data)) + if (strlen(data.symbol) >= 5 && strncmp(data.symbol, "TXSCL", 5) == 0) + isTxscl = 1; + } + + if (isTxscl || eval->CheckNotaryInputs(tx, nHeight, block.nTime)) { + NotarisationData data; + if (ParseNotarisationOpReturn(tx, data)) { vNotarisations.push_back(std::make_pair(tx.GetHash(), data)); + //printf("Parsed a notarisation for: %s, txid:%s, ccid:%i, momdepth:%i\n", + // data.symbol, tx.GetHash().GetHex().data(), data.ccId, data.MoMDepth); + //if (!data.MoMoM.IsNull()) printf("MoMoM:%s\n", data.MoMoM.GetHex().data()); + } else LogPrintf("WARNING: Couldn't parse notarisation for tx: %s at height %i\n", tx.GetHash().GetHex().data(), nHeight);