Merge pull request #263 from svost/const
author0xDEADFACE <masmfan@gmail.com>
Tue, 19 Jan 2016 07:31:29 +0000 (07:31 +0000)
committer0xDEADFACE <masmfan@gmail.com>
Tue, 19 Jan 2016 07:31:29 +0000 (07:31 +0000)
We have constants (commit e1fc548)

contrib/docker_builder/README.md [new file with mode: 0644]
contrib/docker_builder/dockerfile [new file with mode: 0644]
src/base58.h
src/bitcoinrpc.h
src/main.h
src/net.h
src/netbase.h
src/protocol.h
src/script.h
src/serialize.h
src/version.cpp

diff --git a/contrib/docker_builder/README.md b/contrib/docker_builder/README.md
new file mode 100644 (file)
index 0000000..7526439
--- /dev/null
@@ -0,0 +1,29 @@
+# Dockerfile for building novacoin binaries.
+
+Now, you can build your own novacoin files on all systems with docker and do it easy without installing depends on your system.
+
+## How:
+
+### Build docker image
+
+```
+sudo docker build .
+```
+
+### Run docker container
+
+Builder will return HASH of image
+Example:
+Successfully built 9bbff825d50f
+
+```
+sudo docker run -it -v ~/path/to/novacoin/folder:/novacoin 9bbff825d50f
+```
+
+If your system uses SELINUX you may use --privileged=true key
+
+```
+sudo docker run --privileged=true -it -v ~/development/novacoin:/novacoin 9bbff825d50f
+```
+
+See novacoin-qt file in used novacoin folder and novacoind file in src subfolder.
\ No newline at end of file
diff --git a/contrib/docker_builder/dockerfile b/contrib/docker_builder/dockerfile
new file mode 100644 (file)
index 0000000..cce3771
--- /dev/null
@@ -0,0 +1,38 @@
+FROM ubuntu:latest
+
+# Install deps
+RUN apt-get update -y              \
+ &&  apt-get install -y             \
+  qt4-qmake                    \
+  libqt4-dev                   \
+  build-essential              \
+  libboost-dev                 \
+  libboost-system-dev          \
+  libboost-filesystem-dev      \
+  libboost-program-options-dev \ 
+  libboost-thread-dev          \
+  libssl-dev                   \
+  libdb++-dev                  \
+  libqrencode-dev              \
+  wget                         \
+  pkg-config                   \
+  libpng3-dev
+                         
+
+RUN wget http://fukuchi.org/works/qrencode/qrencode-3.4.4.tar.gz; tar zxf ./qrencode-3.4.4.tar.gz 
+WORKDIR /qrencode-3.4.4
+RUN ./configure --enable-static; \ 
+  make; \
+  make install
+
+VOLUME /novacoin
+
+WORKDIR /novacoin
+
+ENTRYPOINT qmake USE_O3=1 USE_ASM=1 RELEASE=1 && \
+ make && \
+ cd src && \
+ make -f makefile.unix USE_O3=1 USE_ASM=1 STATIC=1 && \
+ strip novacoind
+
index 9a4085d..b8a0e45 100644 (file)
@@ -102,7 +102,7 @@ public:
         PUBKEY_ADDRESS = 8,
         SCRIPT_ADDRESS = 20,
         PUBKEY_ADDRESS_TEST = 111,
-        SCRIPT_ADDRESS_TEST = 196,
+        SCRIPT_ADDRESS_TEST = 196
     };
 
     bool Set(const CKeyID &id);
index ad64a84..dcf0863 100644 (file)
@@ -27,7 +27,7 @@ enum HTTPStatusCode
     HTTP_UNAUTHORIZED          = 401,
     HTTP_FORBIDDEN             = 403,
     HTTP_NOT_FOUND             = 404,
-    HTTP_INTERNAL_SERVER_ERROR = 500,
+    HTTP_INTERNAL_SERVER_ERROR = 500
 };
 
 // Bitcoin RPC error codes
@@ -63,7 +63,7 @@ enum RPCErrorCode
     RPC_WALLET_PASSPHRASE_INCORRECT = -14, // The wallet passphrase entered was incorrect
     RPC_WALLET_WRONG_ENC_STATE      = -15, // Command given in wrong wallet encryption state (encrypting an encrypted wallet etc.)
     RPC_WALLET_ENCRYPTION_FAILED    = -16, // Failed to encrypt the wallet
-    RPC_WALLET_ALREADY_UNLOCKED     = -17, // Wallet is already unlocked
+    RPC_WALLET_ALREADY_UNLOCKED     = -17  // Wallet is already unlocked
 };
 
 json_spirit::Object JSONRPCError(int code, const std::string& message);
index 5ecc490..8bc6a7d 100644 (file)
@@ -427,7 +427,7 @@ enum GetMinFee_mode
 {
     GMF_BLOCK,
     GMF_RELAY,
-    GMF_SEND,
+    GMF_SEND
 };
 
 typedef std::map<uint256, std::pair<CTxIndex, CTransaction> > MapPrevTx;
@@ -1176,7 +1176,7 @@ public:
     {
         BLOCK_PROOF_OF_STAKE = (1 << 0), // is proof-of-stake block
         BLOCK_STAKE_ENTROPY  = (1 << 1), // entropy bit for stake modifier
-        BLOCK_STAKE_MODIFIER = (1 << 2), // regenerated stake modifier
+        BLOCK_STAKE_MODIFIER = (1 << 2)  // regenerated stake modifier
     };
 
     uint64_t nStakeModifier; // hash modifier for proof-of-stake
index 56c7b2f..4045b5e 100644 (file)
--- a/src/net.h
+++ b/src/net.h
@@ -77,7 +77,7 @@ CAddress GetLocalAddress(const CNetAddr *paddrPeer = NULL);
 enum
 {
     MSG_TX = 1,
-    MSG_BLOCK,
+    MSG_BLOCK
 };
 
 class CRequestTracker
index 9300003..883b62d 100644 (file)
@@ -25,7 +25,7 @@ enum Network
     NET_TOR,
     NET_I2P,
 
-    NET_MAX,
+    NET_MAX
 };
 
 extern int nConnectTimeout;
index 75c24d8..519cdc2 100644 (file)
@@ -68,7 +68,7 @@ class CMessageHeader
 /** nServices flags */
 enum
 {
-    NODE_NETWORK = (1 << 0),
+    NODE_NETWORK = (1 << 0)
 };
 
 /** A CService with information about it as peer */
index 0b94f41..ff289a5 100644 (file)
@@ -36,7 +36,7 @@ enum
     SIGHASH_ALL = 1,
     SIGHASH_NONE = 2,
     SIGHASH_SINGLE = 3,
-    SIGHASH_ANYONECANPAY = 0x80,
+    SIGHASH_ANYONECANPAY = 0x80
 };
 
 /** Script verification flags */
@@ -47,7 +47,7 @@ enum
     SCRIPT_VERIFY_STRICTENC = (1U << 1), // enforce strict conformance to DER and SEC2 for signatures and pubkeys
     SCRIPT_VERIFY_LOW_S     = (1U << 2), // enforce low S values in signatures (depends on STRICTENC)
     SCRIPT_VERIFY_NOCACHE   = (1U << 3), // do not store results in signature cache (but do query it)
-    SCRIPT_VERIFY_NULLDUMMY = (1U << 4), // verify dummy stack item consumed by CHECKMULTISIG is of zero-length
+    SCRIPT_VERIFY_NULLDUMMY = (1U << 4)  // verify dummy stack item consumed by CHECKMULTISIG is of zero-length
 };
 
 // Strict verification:
@@ -79,7 +79,7 @@ enum txnouttype
     TX_PUBKEYHASH,
     TX_SCRIPTHASH,
     TX_MULTISIG,
-    TX_NULL_DATA,
+    TX_NULL_DATA
 };
 
 const char* GetTxnOutputType(txnouttype t);
@@ -228,7 +228,7 @@ enum opcodetype
     OP_PUBKEYHASH = 0xfd,
     OP_PUBKEY = 0xfe,
 
-    OP_INVALIDOPCODE = 0xff,
+    OP_INVALIDOPCODE = 0xff
 };
 
 const char* GetOpName(opcodetype opcode);
index f3b5a70..7eb17c8 100644 (file)
@@ -58,7 +58,7 @@ enum
 
         // modifiers
         SER_SKIPSIG = (1 << 16),
-        SER_BLOCKHEADERONLY = (1 << 17),
+        SER_BLOCKHEADERONLY = (1 << 17)
 
 };
 
index 8e74499..e5d592d 100644 (file)
@@ -18,6 +18,10 @@ const std::string CLIENT_NAME("Satoshi");
 #endif
 
 // Compiler name
+#if defined(__GNUC__) && defined(__INTEL_COMPILER)
+/*code specific to linux icc compiler*/
+#define CL_NAME   "-icc"
+#else
 #ifdef __GNUC__
 /*code for GNU C compiler */
 #define CL_NAME   "-gcc"
@@ -35,6 +39,7 @@ const std::string CLIENT_NAME("Satoshi");
 #define CL_NAME   "-genericcl"
 /*others*/
 #endif
+#endif
 
 // The following part of the code determines the CLIENT_BUILD variable.
 // Several mechanisms are used for this: