Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
SkaZun committed Feb 22, 2019
2 parents f858a77 + 107bf0c commit 39b20cf
Show file tree
Hide file tree
Showing 35 changed files with 415 additions and 377 deletions.
10 changes: 6 additions & 4 deletions README.md
@@ -1,7 +1,10 @@
ESBC Core integration/staging repository
======================================
More information at (http://esbproject.online/)
Visit our ANN thread at [BitcoinTalk](https://bitcointalk.org/index.php?topic=4889530.0), join ou group at [Discord] (https://discord.gg/C6t23JH).
More information at [ESBC.PRO!](http://esbc.pro/)

Visit our ANN thread at [BitcoinTalk](https://bitcointalk.org/index.php?topic=4889530.0)

Join to our group at [Discord](https://discord.gg/C6t23JH)

***

Expand Down Expand Up @@ -36,9 +39,8 @@ Visit our ANN thread at [BitcoinTalk](https://bitcointalk.org/index.php?topic=48
</table>

***

All binaries for different operating systems, you can download in the releases repository:
https://github.com/BlockchainFor/ESBC2/releases

-
***
Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -3,7 +3,7 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 2)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 4)
define(_CLIENT_VERSION_BUILD, 7)
define(_CLIENT_VERSION_BUILD, 14)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2019)
AC_INIT([ESBC Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[http://esbproject.online/],[esbcoin])
Expand Down
23 changes: 12 additions & 11 deletions doc/build-osx.md
Expand Up @@ -5,7 +5,7 @@ This guide will show you how to build esbcoind (headless client) for OSX.
Notes
-----

* Tested on OS X 10.7 through 10.10 on 64-bit Intel processors only.
* Tested on OS X 10.12.

* All of the commands should be executed in a Terminal application. The
built-in one is located in `/Applications/Utilities`.
Expand All @@ -21,12 +21,6 @@ Xcode 4.3 or later, you'll need to install its command line tools. This can
be done in `Xcode > Preferences > Downloads > Components` and generally must
be re-done or updated every time Xcode is updated.

There's also an assumption that you already have `git` installed. If
not, it's the path of least resistance to install [Github for Mac](https://mac.github.com/)
(OS X 10.7+) or
[Git for OS X](https://code.google.com/p/git-osx-installer/). It is also
available via Homebrew.

You will also need to install [Homebrew](http://brew.sh) in order to install library
dependencies.

Expand All @@ -38,14 +32,16 @@ Instructions: Homebrew

#### Install dependencies using Homebrew

brew install autoconf automake berkeley-db4 libtool boost miniupnpc openssl pkg-config protobuf qt5 libzmq
brew install autoconf automake berkeley-db4 libtool miniupnpc openssl pkg-config protobuf qt5 libevent librsvg
brew install boost@1.57
brew link boost@1.57 --force

### Building `esbcoind`
### Building `ESBC`

1. Clone the github tree to get the source code and go into the directory.

git clone https://github.com/esbcoin-Core/esbcoin.git
cd esbcoin
git clone https://github.com/BlockchainFor/ESBC2.git
cd ESBC2

2. Build esbcoind:

Expand All @@ -61,6 +57,11 @@ Instructions: Homebrew

make install

5. (Optional) You can also build dmg image for esbcoin-qt:

make deploy


Use Qt Creator as IDE
------------------------
You can use Qt Creator as IDE, for debugging and for manipulating forms, etc.
Expand Down
15 changes: 8 additions & 7 deletions src/chainparams.cpp
Expand Up @@ -107,9 +107,10 @@ class CMainParams : public CChainParams
nMinerThreads = 0;
nTargetSpacing = 2 * 60; // 2 minute
nTargetSpacingSlowLaunch = 2 * 60; // before block 100
nPoSTargetSpacing = 60; // 1 minute
nMaturity = 40;
nMasternodeCountDrift = 3;
nMaxMoneyOut = 13994245 * COIN;
nMaxMoneyOut = 25481245 * COIN;
nStartMasternodePaymentsBlock = 100;

/** Height or Time Based Activations **/
Expand Down Expand Up @@ -219,12 +220,12 @@ class CTestNetParams : public CMainParams
nMaxMoneyOut = 1000000000 * COIN;

//! Modify the testnet genesis block so the timestamp is valid for a later start.
genesis.nTime = 1541462411;
genesis.nNonce = 290796;
genesis.nTime = 1546300800;
genesis.nNonce = 0;

hashGenesisBlock = genesis.GetHash();

//assert(hashGenesisBlock == uint256("0"));
assert(hashGenesisBlock == uint256("019a701040d795514ea77eda681e74f8de73afdb1b39d541fc0c697585b878dc"));

vFixedSeeds.clear();
vSeeds.clear();
Expand All @@ -247,9 +248,9 @@ class CTestNetParams : public CMainParams

nPoolMaxTransactions = 2;

vAlertPubKey = ParseHex("0428e89226dd86459df40d436a067c83749c78d653e22c556ae2d9b322296f3f1604e2f4789128386bc4acd6184c9a0062cf0cb98cf71cdbca1e808c25b7670367");
vGMPubKey = ParseHex("049e20bd6cc0da7270bfa60daf381593377418ce9270b7dd38a93026acae98966e89da65067b41e388e194a7e4e2276336b3ddba5e3d5bbc81a78a04f982dfb4fc");
strSporkKey = "0416726a44c09752eddf582f08ad668bd49d563322a6ad746347eb6874bbfce2a6ce12c0f991fed88289d977395e1814a0cc1778f24ee2eeaa68d58183f3bd6195";
vAlertPubKey = ParseHex("04e2a902b30e8e5430e4f3d1ac79630282cc65a036d0aa70ec041d8903b9a626b601a888d8479412bcc363250b02cb2f0e783e7dbeef8606a6ab635fde952949f9");
vGMPubKey = ParseHex("0414b78fd29848ca55bacabe49c6bf53c8cb5224cdd84590f21616457c564b01d2c26c69fea8a55b5e336cb40981ba3167b04ddd149a21f59ab07cf30a4b7285b1");
strSporkKey = "043f305881c14698ca11d9ccbbef49714a816da377bcc0b25d2d54e5a5b266605353e5ec4c7f9958899b5e7a550225d652151ada50d040277ef75ada1214f92e77";
strObfuscationPoolDummyAddress = "xJR9MjNhPLKLLCowMWNznC9gkEQHQPjcJr";

}
Expand Down
2 changes: 2 additions & 0 deletions src/chainparams.h
Expand Up @@ -83,6 +83,7 @@ class CChainParams
bool RequireStandard() const { return fRequireStandard; }
int64_t TargetSpacing() const { return nTargetSpacing; }
int64_t TargetSpacingSlowLaunch() const { return nTargetSpacingSlowLaunch; }
int64_t PoSTargetSpacing() const { return nPoSTargetSpacing; }
/** Instamine Prevention, Zero reward to block **/
// int ANTI_INSTAMINE_TIME() const { return nAntiInstamineTime; }
int COINBASE_MATURITY() const { return nMaturity; }
Expand Down Expand Up @@ -132,6 +133,7 @@ class CChainParams
int nToCheckBlockUpgradeMajority;
int64_t nTargetSpacing;
int64_t nTargetSpacingSlowLaunch;
int64_t nPoSTargetSpacing;
// int nAntiInstamineTime;
int nLastPOWBlock;
int nStartMasternodePaymentsBlock;
Expand Down
3 changes: 2 additions & 1 deletion src/clientversion.cpp
Expand Up @@ -88,7 +88,8 @@ static std::string FormatVersion(int nVersion)

std::string FormatFullVersion()
{
return "2.0.4.7";
return strprintf("%d.%d.%d.%d", CLIENT_VERSION_MAJOR, CLIENT_VERSION_MINOR, CLIENT_VERSION_REVISION, CLIENT_VERSION_BUILD);
// return "2.0.4.11";
// return CLIENT_BUILD;
}

Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Expand Up @@ -17,7 +17,7 @@
#define CLIENT_VERSION_MAJOR 2
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 4
#define CLIENT_VERSION_BUILD 7
#define CLIENT_VERSION_BUILD 14

//! Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
Expand Down
4 changes: 2 additions & 2 deletions src/leveldbwrapper.cpp
Expand Up @@ -13,7 +13,7 @@
#include <leveldb/filter_policy.h>
#include <memenv.h>

void HandleError(const leveldb::Status& status) throw(leveldb_error)
void HandleError(const leveldb::Status& status)
{
if (status.ok())
return;
Expand Down Expand Up @@ -80,7 +80,7 @@ CLevelDBWrapper::~CLevelDBWrapper()
options.env = NULL;
}

bool CLevelDBWrapper::WriteBatch(CLevelDBBatch& batch, bool fSync) throw(leveldb_error)
bool CLevelDBWrapper::WriteBatch(CLevelDBBatch& batch, bool fSync)
{
leveldb::Status status = pdb->Write(fSync ? syncoptions : writeoptions, &batch.batch);
HandleError(status);
Expand Down
14 changes: 7 additions & 7 deletions src/leveldbwrapper.h
Expand Up @@ -22,7 +22,7 @@ class leveldb_error : public std::runtime_error
leveldb_error(const std::string& msg) : std::runtime_error(msg) {}
};

void HandleError(const leveldb::Status& status) throw(leveldb_error);
void HandleError(const leveldb::Status& status);

/** Batch of changes queued to be written to a CLevelDBWrapper */
class CLevelDBBatch
Expand Down Expand Up @@ -90,7 +90,7 @@ class CLevelDBWrapper
~CLevelDBWrapper();

template <typename K, typename V>
bool Read(const K& key, V& value) const throw(leveldb_error)
bool Read(const K& key, V& value) const
{
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
ssKey.reserve(ssKey.GetSerializeSize(key));
Expand All @@ -115,15 +115,15 @@ class CLevelDBWrapper
}

template <typename K, typename V>
bool Write(const K& key, const V& value, bool fSync = false) throw(leveldb_error)
bool Write(const K& key, const V& value, bool fSync = false)
{
CLevelDBBatch batch;
batch.Write(key, value);
return WriteBatch(batch, fSync);
}

template <typename K>
bool Exists(const K& key) const throw(leveldb_error)
bool Exists(const K& key) const
{
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
ssKey.reserve(ssKey.GetSerializeSize(key));
Expand All @@ -142,22 +142,22 @@ class CLevelDBWrapper
}

template <typename K>
bool Erase(const K& key, bool fSync = false) throw(leveldb_error)
bool Erase(const K& key, bool fSync = false)
{
CLevelDBBatch batch;
batch.Erase(key);
return WriteBatch(batch, fSync);
}

bool WriteBatch(CLevelDBBatch& batch, bool fSync = false) throw(leveldb_error);
bool WriteBatch(CLevelDBBatch& batch, bool fSync = false);

// not available for LevelDB; provide for compatibility with BDB
bool Flush()
{
return true;
}

bool Sync() throw(leveldb_error)
bool Sync()
{
CLevelDBBatch batch;
return WriteBatch(batch, true);
Expand Down

0 comments on commit 39b20cf

Please sign in to comment.