mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
refactored checking for correct key image file
This commit is contained in:
parent
314d679812
commit
21604647ce
2 changed files with 4 additions and 4 deletions
|
@ -9,6 +9,7 @@
|
||||||
#define BLOCKCHAIN_DB DB_LMDB
|
#define BLOCKCHAIN_DB DB_LMDB
|
||||||
|
|
||||||
|
|
||||||
|
#define KEY_IMAGE_EXPORT_FILE_MAGIC "Monero key image export\001"
|
||||||
#define UNSIGNED_TX_PREFIX "Monero unsigned tx set\002"
|
#define UNSIGNED_TX_PREFIX "Monero unsigned tx set\002"
|
||||||
#define SIGNED_TX_PREFIX "Monero signed tx set\002"
|
#define SIGNED_TX_PREFIX "Monero signed tx set\002"
|
||||||
|
|
||||||
|
|
|
@ -44,8 +44,6 @@
|
||||||
#define TMPL_MY_RAWKEYIMGS TMPL_DIR "/rawkeyimgs.html"
|
#define TMPL_MY_RAWKEYIMGS TMPL_DIR "/rawkeyimgs.html"
|
||||||
#define TMPL_MY_CHECKRAWKEYIMGS TMPL_DIR "/checkrawkeyimgs.html"
|
#define TMPL_MY_CHECKRAWKEYIMGS TMPL_DIR "/checkrawkeyimgs.html"
|
||||||
|
|
||||||
#define KEY_IMAGE_EXPORT_FILE_MAGIC "Monero key image export\001"
|
|
||||||
|
|
||||||
namespace xmreg {
|
namespace xmreg {
|
||||||
|
|
||||||
|
|
||||||
|
@ -2008,9 +2006,10 @@ namespace xmreg {
|
||||||
|
|
||||||
const size_t magiclen = strlen(KEY_IMAGE_EXPORT_FILE_MAGIC);
|
const size_t magiclen = strlen(KEY_IMAGE_EXPORT_FILE_MAGIC);
|
||||||
|
|
||||||
if (strncmp(decoded_raw_data.c_str(), KEY_IMAGE_EXPORT_FILE_MAGIC, magiclen) == 0)
|
if (!strncmp(decoded_raw_data.c_str(), KEY_IMAGE_EXPORT_FILE_MAGIC, magiclen) == 0)
|
||||||
{
|
{
|
||||||
cout << "KEY_IMAGE_EXPORT_FILE_MAGIC data given" << endl;
|
cout << "This does not seem to be key image export data" << endl;
|
||||||
|
return string {"This does not seem to be key image export data"};
|
||||||
}
|
}
|
||||||
|
|
||||||
// header is magic + public spend and keys
|
// header is magic + public spend and keys
|
||||||
|
|
Loading…
Reference in a new issue