diff --git a/.circleci/config.yml b/.circleci/config.yml old mode 100644 new mode 100755 diff --git a/.gitmodules b/.gitmodules old mode 100644 new mode 100755 diff --git a/.ycm_extra_conf.py b/.ycm_extra_conf.py old mode 100644 new mode 100755 index 6e9139b..95e5e40 --- a/.ycm_extra_conf.py +++ b/.ycm_extra_conf.py @@ -1,4 +1,4 @@ -# Generated by YCM Generator at 2019-02-04 16:43:28.957650 +# Generated by YCM Generator at 2019-10-03 15:56:37.946820 # This file is NOT licensed under the GPLv3, which is the license for the rest # of YouCompleteMe. @@ -36,28 +36,18 @@ import ycm_core flags = [ '-x', 'c++', - '-DASIO_STANDALONE=YES', - '-DBUILD_SSL=TRUE', - '-I/home/mwo2/monero/build', - '-I/home/mwo2/monero/contrib/epee/include', - '-I/home/mwo2/monero/external', - '-I/home/mwo2/monero/external/db_drivers/liblmdb', - '-I/home/mwo2/monero/external/easylogging++', - '-I/home/mwo2/monero/src', - '-I/home/mwo2/openmonero/ext/restbed/source', '-I/home/mwo2/openmonero/src/xmregcore', + '-I/tmp/tmpK6lVvg/distribution/include', + '-I/tmp/tmpK6lVvg/gen', '-I/usr/include/mysql', - '-I/usr/local/include', - '-I/usr/local/include/mysql', - '-I/usr/local/opt/openssl/include', - '-Wall', - '-Weffc++', - '-Wextra', - '-Wno-unknown-pragmas', - '-std=c++14', + '-I/usr/include/mysql++', '-std=gnu++14', - '-isystem', '/home/mwo2/openmonero/ext/restbed/dependency/asio/asio/include', - '-isystem', '/home/mwo2/openmonero/ext/restbed/dependency/kashmir', + '-isystem', '/home/mwo2/monero/build', + '-isystem', '/home/mwo2/monero/contrib/epee/include', + '-isystem', '/home/mwo2/monero/external', + '-isystem', '/home/mwo2/monero/external/db_drivers/liblmdb', + '-isystem', '/home/mwo2/monero/external/easylogging++', + '-isystem', '/home/mwo2/monero/src', ] diff --git a/cmake/FindASan.cmake b/cmake/FindASan.cmake old mode 100644 new mode 100755 diff --git a/cmake/FindHIDAPI.cmake b/cmake/FindHIDAPI.cmake old mode 100644 new mode 100755 diff --git a/cmake/FindMSan.cmake b/cmake/FindMSan.cmake old mode 100644 new mode 100755 diff --git a/cmake/FindMySQL++.cmake b/cmake/FindMySQL++.cmake old mode 100644 new mode 100755 diff --git a/cmake/FindRestbed.cmake b/cmake/FindRestbed.cmake old mode 100644 new mode 100755 diff --git a/cmake/FindSanitizers.cmake b/cmake/FindSanitizers.cmake old mode 100644 new mode 100755 diff --git a/cmake/FindTSan.cmake b/cmake/FindTSan.cmake old mode 100644 new mode 100755 diff --git a/cmake/FindUBSan.cmake b/cmake/FindUBSan.cmake old mode 100644 new mode 100755 diff --git a/cmake/sanitize-helpers.cmake b/cmake/sanitize-helpers.cmake old mode 100644 new mode 100755 diff --git a/ext/ThreadPool.hpp b/ext/ThreadPool.hpp old mode 100644 new mode 100755 diff --git a/ext/ThreadSafeQueue.hpp b/ext/ThreadSafeQueue.hpp old mode 100644 new mode 100755 diff --git a/html/js/cn_util.js b/html/js/cn_util.js old mode 100644 new mode 100755 diff --git a/html/js/controllers/send_coins.js b/html/js/controllers/send_coins.js old mode 100644 new mode 100755 diff --git a/html/js/crypto.js b/html/js/crypto.js old mode 100644 new mode 100755 diff --git a/html/js/lib/mymonero-core.js b/html/js/lib/mymonero-core.js old mode 100644 new mode 100755 diff --git a/html/js/lib/mymonero_core_js/monero_utils/MyMoneroCoreCpp_WASM.wasm b/html/js/lib/mymonero_core_js/monero_utils/MyMoneroCoreCpp_WASM.wasm old mode 100644 new mode 100755 diff --git a/scripts/README.md b/scripts/README.md old mode 100644 new mode 100755 diff --git a/src/OpenMoneroRequests.cpp b/src/OpenMoneroRequests.cpp index c62874c..f5d5baa 100755 --- a/src/OpenMoneroRequests.cpp +++ b/src/OpenMoneroRequests.cpp @@ -1710,9 +1710,19 @@ OpenMoneroRequests::get_tx( if (current_bc_status->get_xmr_address_viewkey( xmr_address, address_info, viewkey)) { + auto coreacc = make_account(xmr_address, view_key); + + if (!coreacc) + { + // if creation failed, just close the session + session_close(session, j_response, UNPROCESSABLE_ENTITY, + "Cant create coreacc for " + xmr_address); + return; + } - auto identifier = make_identifier(tx, - make_unique(&address_info, &viewkey)); + auto identifier = make_identifier( + tx, + make_unique(coreacc.get())); identifier.identify(); @@ -1739,6 +1749,7 @@ OpenMoneroRequests::get_tx( // a placeholder for exciting or new account data XmrAccount acc; + // select this account if its existing one if (xmr_accounts->select(xmr_address, acc)) { @@ -1819,7 +1830,7 @@ OpenMoneroRequests::get_tx( // and inputs in a given tx. auto identifier = make_identifier(tx, - make_unique(&address_info, &viewkey, + make_unique(coreacc.get(), &known_outputs_keys, &mcore_addapter)); identifier.identify(); diff --git a/src/xmregcore b/src/xmregcore index 4356c98..284f7b6 160000 --- a/src/xmregcore +++ b/src/xmregcore @@ -1 +1 @@ -Subproject commit 4356c9892b9903da4410f773ea36a6e4c799be5a +Subproject commit 284f7b679262323835fe7bb83b02fd269a4500f1 diff --git a/tests/JsonTx.cpp b/tests/JsonTx.cpp old mode 100644 new mode 100755 diff --git a/tests/JsonTx.h b/tests/JsonTx.h old mode 100644 new mode 100755 diff --git a/tests/res/tx/README.md b/tests/res/tx/README.md old mode 100644 new mode 100755 diff --git a/tests/res/tx/d7dcb2daa64b5718dad71778112d48ad62f4d5f54337037c420cb76efdd8a21c.json b/tests/res/tx/d7dcb2daa64b5718dad71778112d48ad62f4d5f54337037c420cb76efdd8a21c.json old mode 100644 new mode 100755 diff --git a/tests/res/tx/ddff95211b53c194a16c2b8f37ae44b643b8bd46b4cb402af961ecabeb8417b2.json b/tests/res/tx/ddff95211b53c194a16c2b8f37ae44b643b8bd46b4cb402af961ecabeb8417b2.json old mode 100644 new mode 100755 diff --git a/tests/res/tx/f3c84fe925292ec5b4dc383d306d934214f4819611566051bca904d1cf4efceb.json b/tests/res/tx/f3c84fe925292ec5b4dc383d306d934214f4819611566051bca904d1cf4efceb.json old mode 100644 new mode 100755