Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3 from ton-blockchain/master
Browse files Browse the repository at this point in the history
Merge upstream
  • Loading branch information
sonofmom authored Jun 4, 2020
2 parents c425549 + dbde9c1 commit 5890a98
Show file tree
Hide file tree
Showing 156 changed files with 10,775 additions and 1,696 deletions.
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ elseif (CLANG OR GCC)
if (APPLE)
#use "-Wl,-exported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/export_list" for exported symbols
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fvisibility=hidden -Wl,-dead_strip,-x,-S")
#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fvisibility=hidden -Wl,-dead_strip,-x,-S")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -fvisibility=hidden -Wl,-dead_strip,-x,-S")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffunction-sections -fdata-sections")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections -Wl,--exclude-libs,ALL")
Expand Down Expand Up @@ -378,12 +378,14 @@ add_subdirectory(tdfec)
add_subdirectory(keyring)
add_subdirectory(fec)
add_subdirectory(rldp)
add_subdirectory(rldp2)
add_subdirectory(dht)
add_subdirectory(overlay)
add_subdirectory(catchain)
add_subdirectory(validator-session)
add_subdirectory(validator)
add_subdirectory(blockchain-explorer)
add_subdirectory(storage)
add_subdirectory(validator-engine)
add_subdirectory(validator-engine-console)
add_subdirectory(create-hardfork)
Expand Down Expand Up @@ -445,7 +447,10 @@ endif()
#BEGIN internal
if (NOT TON_ONLY_TONLIB)
add_executable(test-db test/test-td-main.cpp ${TONDB_TEST_SOURCE})
target_link_libraries(test-db PRIVATE ton_db memprof)
target_link_libraries(test-db PRIVATE ton_db memprof tdfec)

add_executable(test-storage test/test-td-main.cpp ${STORAGE_TEST_SOURCE})
target_link_libraries(test-storage PRIVATE storage ton_db memprof tl_api tl-utils fec rldp2)

add_executable(test-rocksdb test/test-rocksdb.cpp)
target_link_libraries(test-rocksdb PRIVATE memprof tddb tdutils)
Expand All @@ -469,6 +474,8 @@ add_executable(test-dht test/test-dht.cpp)
target_link_libraries(test-dht adnl adnltest dht tl_api)
add_executable(test-rldp test/test-rldp.cpp)
target_link_libraries(test-rldp adnl adnltest dht rldp tl_api)
add_executable(test-rldp2 test/test-rldp2.cpp)
target_link_libraries(test-rldp2 adnl adnltest dht rldp2 tl_api)
add_executable(test-validator-session-state test/test-validator-session-state.cpp)
target_link_libraries(test-validator-session-state adnl dht rldp validatorsession tl_api)

Expand Down Expand Up @@ -536,6 +543,7 @@ if (NOT TON_ONLY_TONLIB)
add_test(test-adnl test-adnl)
add_test(test-dht test-dht)
add_test(test-rldp test-rldp)
add_test(test-rldp2 test-rldp2)
#add_test(test-validator-session-state test-validator-session-state)
add_test(test-catchain test-catchain)

Expand Down
3 changes: 2 additions & 1 deletion adnl/adnl-peer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ void AdnlPeerPairImpl::receive_packet_checked(AdnlPacket packet) {
if (!packet.priority_addr_list().empty()) {
update_addr_list(packet.priority_addr_list());
}
VLOG(ADNL_NOTICE) << this << ": dropping IN message old our reinit date " << packet.reinit_date() << " date=" << d;
VLOG(ADNL_NOTICE) << this << ": dropping IN message old our reinit date " << packet.dst_reinit_date()
<< " date=" << d;
auto M = OutboundAdnlMessage{adnlmessage::AdnlMessageNop{}, 0};
send_message(std::move(M));
return;
Expand Down
14 changes: 4 additions & 10 deletions crypto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ set(TON_CRYPTO_SOURCE

vm/db/StaticBagOfCellsDb.h
vm/db/StaticBagOfCellsDb.cpp

vm/db/BlobView.h
vm/db/BlobView.cpp
)

set(TON_DB_SOURCE
Expand All @@ -144,13 +141,15 @@ set(FIFT_SOURCE
fift/Dictionary.cpp
fift/Fift.cpp
fift/IntCtx.cpp
fift/Continuation.cpp
fift/SourceLookup.cpp
fift/utils.cpp
fift/words.cpp

fift/Dictionary.h
fift/Fift.h
fift/IntCtx.h
fift/Continuation.h
fift/SourceLookup.h
fift/utils.h
fift/words.h
Expand Down Expand Up @@ -216,9 +215,7 @@ set(SMC_ENVELOPE_SOURCE
smc-envelope/PaymentChannel.cpp
smc-envelope/SmartContract.cpp
smc-envelope/SmartContractCode.cpp
smc-envelope/TestGiver.cpp
smc-envelope/TestWallet.cpp
smc-envelope/Wallet.cpp
smc-envelope/WalletInterface.cpp
smc-envelope/WalletV3.cpp

smc-envelope/GenericAccount.h
Expand All @@ -228,9 +225,6 @@ set(SMC_ENVELOPE_SOURCE
smc-envelope/MultisigWallet.h
smc-envelope/SmartContract.h
smc-envelope/SmartContractCode.h
smc-envelope/TestGiver.h
smc-envelope/TestWallet.h
smc-envelope/Wallet.h
smc-envelope/WalletInterface.h
smc-envelope/WalletV3.h
)
Expand Down Expand Up @@ -268,7 +262,7 @@ set(FIFT_TEST_SOURCE
add_library(ton_crypto STATIC ${TON_CRYPTO_SOURCE})
target_include_directories(ton_crypto PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>)
target_link_libraries(ton_crypto PUBLIC ${OPENSSL_CRYPTO_LIBRARY} tdutils)
target_link_libraries(ton_crypto PUBLIC ${OPENSSL_CRYPTO_LIBRARY} tdutils tddb_utils)
if (NOT WIN32)
target_link_libraries(ton_crypto PUBLIC dl z)
endif()
Expand Down
5 changes: 5 additions & 0 deletions crypto/common/refcnt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
#include "td/utils/ScopeGuard.h"

namespace td {

Ref<CntObject> CntObject::clone() const {
return Ref<CntObject>{make_copy(), Ref<CntObject>::acquire_t()};
}

namespace detail {
struct SafeDeleter {
public:
Expand Down
2 changes: 2 additions & 0 deletions crypto/common/refcnt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class CntObject {
void assert_unique() const {
assert(is_unique());
}
Ref<CntObject> clone() const;
};

typedef Ref<CntObject> RefAny;
Expand Down Expand Up @@ -159,6 +160,7 @@ struct static_cast_ref {};
namespace detail {
void safe_delete(const CntObject* ptr);
}

template <class T>
class Ref {
T* ptr;
Expand Down
Loading

0 comments on commit 5890a98

Please sign in to comment.