Merge pull request #321 from kleetus/feature/update_patch_0.11.1

Updated patch to support 0.11.1
This commit is contained in:
Braydon Fuller 2015-10-16 17:44:09 -04:00
commit b387b34861
3 changed files with 14 additions and 81 deletions

View File

@ -1 +1 @@
v0.11.0
v0.11.1

View File

@ -6,7 +6,7 @@ index 0000000..19e9a1b
@@ -0,0 +1 @@
+./configure --enable-tests=no --enable-daemonlib --with-gui=no --without-qt --without-miniupnpc --without-bdb --enable-debug --disable-wallet --without-utils
diff --git a/configure.ac b/configure.ac
index 37fe47e..83cfe70 100644
index fd74aef..9c79637 100644
--- a/configure.ac
+++ b/configure.ac
@@ -119,6 +119,12 @@ AC_ARG_ENABLE([reduce-exports],
@ -139,7 +139,7 @@ index e7aa48d..df0f7ae 100644
endef
diff --git a/src/Makefile.am b/src/Makefile.am
index 1c2f770..5582b7e 100644
index 8de216c..2db76bf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,12 @@
@ -155,15 +155,7 @@ index 1c2f770..5582b7e 100644
if EMBEDDED_LEVELDB
LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/include
@@ -15,6 +21,7 @@ $(LIBLEVELDB) $(LIBMEMENV):
@echo "Building LevelDB ..." && $(MAKE) -C $(@D) $(@F) CXX="$(CXX)" \
CC="$(CC)" PLATFORM=$(TARGET_OS) AR="$(AR)" $(LEVELDB_TARGET_FLAGS) \
OPT="$(CXXFLAGS) $(CPPFLAGS) -D__STDC_LIMIT_MACROS"
+
endif
BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config
@@ -49,16 +56,16 @@ BITCOIN_INCLUDES += $(BDB_CPPFLAGS)
@@ -49,16 +55,16 @@ BITCOIN_INCLUDES += $(BDB_CPPFLAGS)
EXTRA_LIBRARIES += libbitcoin_wallet.a
endif
@ -187,7 +179,7 @@ index 1c2f770..5582b7e 100644
if BUILD_BITCOIND
bin_PROGRAMS += bitcoind
endif
@@ -66,6 +73,9 @@ endif
@@ -66,6 +72,9 @@ endif
if BUILD_BITCOIN_UTILS
bin_PROGRAMS += bitcoin-cli bitcoin-tx
endif
@ -197,7 +189,7 @@ index 1c2f770..5582b7e 100644
.PHONY: FORCE
# bitcoin core #
@@ -169,8 +179,11 @@ obj/build.h: FORCE
@@ -170,8 +179,11 @@ obj/build.h: FORCE
@$(MKDIR_P) $(builddir)/obj
@$(top_srcdir)/share/genbuild.sh $(abs_top_builddir)/src/obj/build.h \
$(abs_top_srcdir)
@ -210,7 +202,7 @@ index 1c2f770..5582b7e 100644
# server: shared between bitcoind and bitcoin-qt
libbitcoin_server_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(MINIUPNPC_CPPFLAGS)
libbitcoin_server_a_SOURCES = \
@@ -309,9 +322,18 @@ nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
@@ -310,9 +322,18 @@ nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
bitcoind_SOURCES = bitcoind.cpp
bitcoind_CPPFLAGS = $(BITCOIN_INCLUDES)
bitcoind_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
@ -229,7 +221,7 @@ index 1c2f770..5582b7e 100644
endif
bitcoind_LDADD = \
@@ -326,10 +348,21 @@ bitcoind_LDADD = \
@@ -327,10 +348,21 @@ bitcoind_LDADD = \
if ENABLE_WALLET
bitcoind_LDADD += libbitcoin_wallet.a
@ -281,7 +273,7 @@ index cce687a..0f162ff 100644
}
+#endif
diff --git a/src/init.cpp b/src/init.cpp
index d127d55..fafd4fd 100644
index e352d58..e1179a3 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -638,21 +638,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
@ -322,70 +314,11 @@ index dcb2b29..5ce68ba 100644
void StartShutdown();
bool ShutdownRequested();
void Shutdown();
diff --git a/src/leveldb/Makefile b/src/leveldb/Makefile
index 2bd2cad..a85d3ca 100644
--- a/src/leveldb/Makefile
+++ b/src/leveldb/Makefile
@@ -16,10 +16,9 @@ OPT ?= -O2 -DNDEBUG
# detect what platform we're building on
$(shell CC="$(CC)" CXX="$(CXX)" TARGET_OS="$(TARGET_OS)" \
- ./build_detect_platform build_config.mk ./)
+ ./build_detect_platform build_config.mk .)
# this file is generated by the previous line to set build flags and sources
include build_config.mk
-
CFLAGS += -I. -I./include $(PLATFORM_CCFLAGS) $(OPT)
CXXFLAGS += -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT)
diff --git a/src/leveldbwrapper.h b/src/leveldbwrapper.h
index c65e842..0e44bb5 100644
--- a/src/leveldbwrapper.h
+++ b/src/leveldbwrapper.h
@@ -29,10 +29,16 @@ class CLevelDBBatch
{
friend class CLevelDBWrapper;
+#if ENABLE_DAEMONLIB
+public:
+#else
private:
+#endif
leveldb::WriteBatch batch;
+#if !ENABLE_DAEMONLIB
public:
+#endif
template <typename K, typename V>
void Write(const K& key, const V& value)
{
@@ -63,7 +69,11 @@ public:
class CLevelDBWrapper
{
+#if ENABLE_DAEMONLIB
+public:
+#else
private:
+#endif
//! custom environment this database is using (may be NULL in case of default environment)
leveldb::Env* penv;
@@ -85,7 +95,9 @@ private:
//! the database itself
leveldb::DB* pdb;
+#if !ENABLE_DAEMONLIB
public:
+#endif
CLevelDBWrapper(const boost::filesystem::path& path, size_t nCacheSize, bool fMemory = false, bool fWipe = false);
~CLevelDBWrapper();
diff --git a/src/main.cpp b/src/main.cpp
index 8f82abf..42bea1c 100644
index f6deaa2..4251721 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1058,6 +1058,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
@@ -1081,6 +1081,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
// Store transaction in memory
pool.addUnchecked(hash, entry, !IsInitialBlockDownload());
@ -394,10 +327,10 @@ index 8f82abf..42bea1c 100644
SyncWithWallets(tx, NULL);
diff --git a/src/net.cpp b/src/net.cpp
index 3908be6..cf3ffd4 100644
index f94771a..de6c7d0 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -426,8 +426,10 @@ void CNode::PushVersion()
@@ -432,8 +432,10 @@ void CNode::PushVersion()
LogPrint("net", "send version message: version %d, blocks=%d, us=%s, them=%s, peer=%d\n", PROTOCOL_VERSION, nBestHeight, addrMe.ToString(), addrYou.ToString(), id);
else
LogPrint("net", "send version message: version %d, blocks=%d, us=%s, peer=%d\n", PROTOCOL_VERSION, nBestHeight, addrMe.ToString(), id);

View File

@ -291,7 +291,7 @@ describe('Node Functionality', function() {
info.satoshis.should.equal(10 * 1e8);
info.confirmations.should.equal(3);
info.timestamp.should.be.a('number');
info.fees.should.be.within(190, 193);
info.fees.should.be.within(950, 970);
info.tx.should.be.an.instanceof(Transaction);
done();
});