Skip to content

Commit

Permalink
Merge pull request #1450 from darcys22/batch-sn-payments
Browse files Browse the repository at this point in the history
Batch sn payments
  • Loading branch information
jagerman authored May 10, 2022
2 parents 0d266a4 + f82be89 commit 3ac7e55
Show file tree
Hide file tree
Showing 77 changed files with 2,752 additions and 779 deletions.
11 changes: 6 additions & 5 deletions .drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,10 @@ local mac_builder(name,
'mkdir build',
'cd build',
'cmake .. -G Ninja -DCMAKE_CXX_FLAGS=-fcolor-diagnostics -DCMAKE_BUILD_TYPE=' + build_type + ' ' +
'-DLOCAL_MIRROR=https://builds.lokinet.dev/deps '
+ cmake_options({ USE_LTO: lto, WARNINGS_AS_ERRORS: werror, BUILD_TESTS: build_tests || run_tests })
+ cmake_extra,
'-DLOCAL_MIRROR=https://builds.lokinet.dev/deps -DUSE_LTO=' + (if lto then 'ON ' else 'OFF ') +
(if werror then '-DWARNINGS_AS_ERRORS=ON ' else '') +
(if build_tests || run_tests then '-DBUILD_TESTS=ON ' else '') +
cmake_extra,
'ninja -j' + jobs + ' -v',
] + (
if run_tests then [
Expand Down Expand Up @@ -325,13 +326,13 @@ local gui_wallet_step_darwin = {
'mkdir -p build/{arm64,sim64}',
'cd build/arm64',
'cmake ../.. -G Ninja ' +
'-DCMAKE_TOOLCHAIN_FILE=../../cmake/ios.toolchain.cmake -DPLATFORM=OS -DDEPLOYMENT_TARGET=11 -DENABLE_VISIBILITY=ON -DENABLE_BITCODE=OFF ' +
'-DCMAKE_TOOLCHAIN_FILE=../../cmake/ios.toolchain.cmake -DPLATFORM=OS -DDEPLOYMENT_TARGET=13 -DENABLE_VISIBILITY=ON -DENABLE_BITCODE=OFF ' +
'-DSTATIC=ON -DBUILD_STATIC_DEPS=ON -DUSE_LTO=OFF -DCMAKE_BUILD_TYPE=Release ' +
'-DRANDOMX_ENABLE_JIT=OFF -DCMAKE_CXX_FLAGS=-fcolor-diagnostics',
'ninja -j6 -v wallet_merged',
'cd ../sim64',
'cmake ../.. -G Ninja ' +
'-DCMAKE_TOOLCHAIN_FILE=../../cmake/ios.toolchain.cmake -DPLATFORM=SIMULATOR64 -DDEPLOYMENT_TARGET=11 -DENABLE_VISIBILITY=ON -DENABLE_BITCODE=OFF ' +
'-DCMAKE_TOOLCHAIN_FILE=../../cmake/ios.toolchain.cmake -DPLATFORM=SIMULATOR64 -DDEPLOYMENT_TARGET=13 -DENABLE_VISIBILITY=ON -DENABLE_BITCODE=OFF ' +
'-DSTATIC=ON -DBUILD_STATIC_DEPS=ON -DUSE_LTO=OFF -DCMAKE_BUILD_TYPE=Release ' +
'-DRANDOMX_ENABLE_JIT=OFF -DCMAKE_CXX_FLAGS=-fcolor-diagnostics',
'ninja -j6 -v wallet_merged',
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ if(NOT MANUAL_SUBMODULES)
check_submodule(external/trezor-common)
check_submodule(external/randomx)
check_submodule(external/loki-mq cppzmq)
check_submodule(external/SQLiteCpp)
if(BUILD_TESTS)
check_submodule(external/googletest)
endif()
Expand Down
3 changes: 3 additions & 0 deletions src/blockchain_db/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@
add_library(blockchain_db
blockchain_db.cpp
lmdb/db_lmdb.cpp
sqlite/db_sqlite.cpp
)

target_link_libraries(blockchain_db
PUBLIC
SQLiteCpp
PRIVATE
common
ringct
Expand Down
2 changes: 2 additions & 0 deletions src/blockchain_db/blockchain_db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,9 @@ bool BlockchainDB::get_pruned_tx(const crypto::hash& h, cryptonote::transaction
if (!get_pruned_tx_blob(h, bd))
return false;
if (!parse_and_validate_tx_base_from_blob(bd, tx))
{
throw DB_ERROR("Failed to parse transaction base from blob retrieved from the db");
}

return true;
}
Expand Down
3 changes: 3 additions & 0 deletions src/blockchain_db/lmdb/db_lmdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2542,6 +2542,7 @@ T BlockchainLMDB::get_and_convert_block_blob_from_height(uint64_t height) const
// header, not the full-block (of which a good chunk is thrown away because we
// only want the header).
LOG_PRINT_L3("BlockchainLMDB::" << __func__);

check_open();

TXN_PREFIX_RDONLY();
Expand Down Expand Up @@ -3619,7 +3620,9 @@ bool BlockchainLMDB::for_all_transactions(std::function<bool(const crypto::hash&
if (pruned)
{
if (!parse_and_validate_tx_base_from_blob(bd, tx))
{
throw0(DB_ERROR("Failed to parse tx from blob retrieved from the db"));
}
}
else
{
Expand Down
Loading

0 comments on commit 3ac7e55

Please sign in to comment.