diff --git a/src/Makefile.ktest.include b/src/Makefile.ktest.include index 93d3460e2..07c64caa0 100644 --- a/src/Makefile.ktest.include +++ b/src/Makefile.ktest.include @@ -10,7 +10,8 @@ komodo_test_SOURCES = \ test-komodo/test_coinimport.cpp \ test-komodo/test_eval_bet.cpp \ test-komodo/test_eval_notarisation.cpp \ - test-komodo/test_crosschain.cpp + test-komodo/test_crosschain.cpp \ + test-komodo/test_parse_notarisation.cpp komodo_test_CPPFLAGS = $(komodod_CPPFLAGS) diff --git a/src/cc/eval.h b/src/cc/eval.h index 66e0c43f1..676fd0a73 100644 --- a/src/cc/eval.h +++ b/src/cc/eval.h @@ -182,6 +182,7 @@ public: { if (ASSETCHAINS_SYMBOL[0]) return 1; if (s.size() >= 72 && strcmp("BTC", &s[68]) == 0) return 1; + if (s.size() >= 72 && strcmp("KMD", &s[68]) == 0) return 1; return 0; } diff --git a/src/test-komodo/test_parse_notarisation.cpp b/src/test-komodo/test_parse_notarisation.cpp new file mode 100644 index 000000000..285f98813 --- /dev/null +++ b/src/test-komodo/test_parse_notarisation.cpp @@ -0,0 +1,23 @@ +#include + +#include "cc/eval.h" +#include "core_io.h" +#include "key.h" + +#include "testutils.h" + + +namespace TestParseNotarisation { + +class TestParseNotarisation : public ::testing::Test, public Eval {}; + + +TEST(TestParseNotarisation, test_ee2fa) +{ + // ee2fa47820a31a979f9f21cb3fedbc484bf9a8957cb6c9acd0af28ced29bdfe1 + std::vector opret = ParseHex("c349ff90f3bce62c1b7b49d1da0423b1a3d9b733130cce825b95b9e047c729066e020d00743a06fdb95ad5775d032b30bbb3680dac2091a0f800cf54c79fd3461ce9b31d4b4d4400"); + NotarisationData nd; + ASSERT_TRUE(E_UNMARSHAL(opret, ss >> nd)); +} + +}