Skip to content

Commit

Permalink
test linkage: add leveldb + memenv
Browse files Browse the repository at this point in the history
  • Loading branch information
DeckerSU committed Mar 10, 2024
1 parent a822a5d commit 33a8ced
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,8 @@ test_linkage_LDADD = \
$(LIBBITCOIN_COMMON) \
$(LIBCJSON) \
$(ZMQ_LIBS) \
$(LIBLEVELDB) \
$(LIBMEMENV) \
-lcurl
bin_PROGRAMS += test-linkage

Expand Down
8 changes: 8 additions & 0 deletions src/test-linkage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
#include "komodo_cJSON.h"
#include "hex.h"
#include <zmq.h>
#include <leveldb/db.h>
#include <leveldb/env.h>
#include <memenv.h>

char *CClib_name(); // cclib.cpp (no interface)

Expand Down Expand Up @@ -56,6 +59,11 @@ int main(int argc, char* argv[])
zmq_version(&zmq_major, &zmq_minor, &zmq_patch);
std::cout << "ZeroMQ version: " << zmq_major << "." << zmq_minor << "." << zmq_patch << std::endl;

// leveldb test
std::cout << "LevelDB version " << leveldb::kMajorVersion << "." << leveldb::kMinorVersion << std::endl;
leveldb::Env* penv = leveldb::NewMemEnv(leveldb::Env::Default());
delete penv;

// std::cout << "CClib name: " << CClib_name() << std::endl;
// nb! libcc can't be added without bitcoin_server and other dependencies

Expand Down

0 comments on commit 33a8ced

Please sign in to comment.