detect backnotarisation by KMD symbol
This commit is contained in:
@@ -10,7 +10,8 @@ komodo_test_SOURCES = \
|
|||||||
test-komodo/test_coinimport.cpp \
|
test-komodo/test_coinimport.cpp \
|
||||||
test-komodo/test_eval_bet.cpp \
|
test-komodo/test_eval_bet.cpp \
|
||||||
test-komodo/test_eval_notarisation.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)
|
komodo_test_CPPFLAGS = $(komodod_CPPFLAGS)
|
||||||
|
|
||||||
|
|||||||
@@ -182,6 +182,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (ASSETCHAINS_SYMBOL[0]) return 1;
|
if (ASSETCHAINS_SYMBOL[0]) return 1;
|
||||||
if (s.size() >= 72 && strcmp("BTC", &s[68]) == 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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
23
src/test-komodo/test_parse_notarisation.cpp
Normal file
23
src/test-komodo/test_parse_notarisation.cpp
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#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<uint8_t> opret = ParseHex("c349ff90f3bce62c1b7b49d1da0423b1a3d9b733130cce825b95b9e047c729066e020d00743a06fdb95ad5775d032b30bbb3680dac2091a0f800cf54c79fd3461ce9b31d4b4d4400");
|
||||||
|
NotarisationData nd;
|
||||||
|
ASSERT_TRUE(E_UNMARSHAL(opret, ss >> nd));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user