From 7b312f6ce680977b12690fa11be83cfe9fd3c02b Mon Sep 17 00:00:00 2001 From: dimxy Date: Sat, 16 Feb 2019 21:59:21 +0500 Subject: [PATCH] added burn tx nExpiryHeight validation --- src/cc/import.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cc/import.cpp b/src/cc/import.cpp index dbbf7832f..1b49f5c94 100644 --- a/src/cc/import.cpp +++ b/src/cc/import.cpp @@ -371,6 +371,12 @@ int32_t CheckPUBKEYimport(TxProof proof,std::vector rawproof,CTransacti return -1; } + // might be malleable: + if (burnTx.nExpiryHeight != sourcetx.nExpiryHeight) { + LOGSTREAM("importcoin", CCLOG_INFO, stream << "burntx nExpiryHeight incorrect for source txid=" << sourcetxid.GetHex() << std::endl); + return -1; + } + //ac_pubkey check: if (CheckVin0PubKey(sourcetx) < 0) { return -1;