diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2011-10-09 13:36:10 -0400 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2011-10-09 13:36:10 -0400 |
commit | eab61cd0b277da17816834fea81aa7a2d7f9c011 (patch) | |
tree | 8903f6977bd2e00fd1ce814c1df7267cc3c079f8 | |
parent | 94eaab77109dd4fa568a855a375adb2c2a3207f9 (diff) | |
parent | 4db9705dd839cbb386398b1eb4be2a67357c27c4 (diff) |
Merge branch 'master' of github.com:bitcoin/bitcoin
-rw-r--r-- | doc/build-unix.txt | 63 | ||||
-rw-r--r-- | src/bitcoinrpc.cpp | 9 |
2 files changed, 52 insertions, 20 deletions
diff --git a/doc/build-unix.txt b/doc/build-unix.txt index b7aa7112b4..e47dbf710c 100644 --- a/doc/build-unix.txt +++ b/doc/build-unix.txt @@ -22,38 +22,63 @@ the graphical bitcoin. Dependencies ------------ + + Library Purpose Description + ------- ------- ----------- + libssl SSL Support Secure communications + libdb4.8 Berkeley DB Blockchain & wallet storage + libboost Boost C++ Library + miniupnpc UPnP Support Optional firewall-jumping support + +miniupnpc may be used for UPnP port mapping. It can be downloaded from +http://miniupnp.tuxfamily.org/files/. UPnP support is compiled in and +turned off by default. Set USE_UPNP to a different value to control this: + USE_UPNP= No UPnP support - miniupnp not required + USE_UPNP=0 (the default) UPnP support turned off by default at runtime + USE_UPNP=1 UPnP support turned on by default at runtime + +Licenses of statically linked libraries: + Berkeley DB New BSD license with additional requirement that linked + software must be free open source + Boost MIT-like license + miniupnpc New (3-clause) BSD license + +Versions used in this release: + GCC 4.3.3 + OpenSSL 0.9.8g + Berkeley DB 4.8.30.NC + Boost 1.37 + miniupnpc 1.6 + + +Dependency Build Instructions: Ubuntu & Debian +---------------------------------------------- sudo apt-get install build-essential sudo apt-get install libssl-dev sudo apt-get install libdb4.8-dev sudo apt-get install libdb4.8++-dev -Boost 1.40+: sudo apt-get install libboost-all-dev -or Boost 1.37: sudo apt-get install libboost1.37-dev + Boost 1.40+: sudo apt-get install libboost-all-dev + or Boost 1.37: sudo apt-get install libboost1.37-dev If using Boost 1.37, append -mt to the boost libraries in the makefile. -Requires miniupnpc for UPnP port mapping. It can be downloaded from -http://miniupnp.tuxfamily.org/files/. UPnP support is compiled in and -turned off by default. Set USE_UPNP to a different value to control this: -USE_UPNP= no UPnP support, miniupnp not required; -USE_UPNP=0 (the default) UPnP support turned off by default at runtime; -USE_UPNP=1 UPnP support turned on by default at runtime. -Licenses of statically linked libraries: -Berkeley DB New BSD license with additional requirement that linked software must be free open source -Boost MIT-like license -miniupnpc New (3-clause) BSD license +Dependency Build Instructions: Gentoo +------------------------------------- +emerge -av boost openssl sys-libs/db -Versions used in this release: -GCC 4.3.3 -OpenSSL 0.9.8g -Berkeley DB 4.8.30.NC -Boost 1.37 -miniupnpc 1.6 +Take the following steps to build (no UPnP support): + cd ${BITCOIN_DIR}/src + sed -i 's/<db_cxx.h>/<db4.8\/db_cxx.h>/' *.h # path fix + sed -i 's/-Bstatic/-Bdynamic/' makefile.unix # dynamic linking + sed -i 's/^USE_UPNP:=0$/USE_UPNP:=/' makefile.unix # disable UPnP + make -f makefile.unix + strip bitcoind Notes ----- -The release is built with GCC and then "strip bitcoin" to strip the debug +The release is built with GCC and then "strip bitcoind" to strip the debug symbols, which reduces the executable size by about 90%. diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index e9d8ca6a04..6e2eac5a7e 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -1773,7 +1773,14 @@ Value getmemorypool(const Array& params, bool fHelp) result.push_back(Pair("transactions", transactions)); result.push_back(Pair("coinbasevalue", (int64_t)pblock->vtx[0].vout[0].nValue)); result.push_back(Pair("time", (int64_t)pblock->nTime)); - result.push_back(Pair("bits", (int64_t)pblock->nBits)); + + union { + int32_t nBits; + char cBits[4]; + } uBits; + uBits.nBits = htonl((int32_t)pblock->nBits); + result.push_back(Pair("bits", HexStr(BEGIN(uBits.cBits), END(uBits.cBits)))); + return result; } else |