Skip to content

Commit

Permalink
Merge pull request #13 from CryptoForge/v3.0.0
Browse files Browse the repository at this point in the history
Merger all updates
  • Loading branch information
CryptoForge authored Apr 25, 2019
2 parents 189150e + 4302818 commit 56f8f2a
Show file tree
Hide file tree
Showing 55 changed files with 12,698 additions and 470 deletions.
28 changes: 28 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ LIBZCASH_H = \
BITCOIN_CORE_H = \
addressindex.h \
spentindex.h \
zeronode/activezeronode.h \
addrman.h \
alert.h \
amount.h \
Expand Down Expand Up @@ -166,6 +167,12 @@ BITCOIN_CORE_H = \
dbwrapper.h \
limitedmap.h \
main.h \
zeronode/zeronode.h \
zeronode/payments.h \
zeronode/budget.h \
zeronode/zeronode-sync.h \
zeronode/zeronodeman.h \
zeronode/zeronodeconfig.h \
memusage.h \
merkleblock.h \
metrics.h \
Expand All @@ -174,6 +181,7 @@ BITCOIN_CORE_H = \
net.h \
netbase.h \
noui.h \
zeronode/obfuscation.h \
policy/fees.h \
pow.h \
prevector.h \
Expand All @@ -195,12 +203,15 @@ BITCOIN_CORE_H = \
script/sign.h \
script/standard.h \
serialize.h \
zeronode/spork.h \
zeronode/sporkdb.h \
streams.h \
support/allocators/secure.h \
support/allocators/zeroafterfree.h \
support/cleanse.h \
support/events.h \
support/pagelocker.h \
zeronode/swifttx.h \
sync.h \
threadsafety.h \
timedata.h \
Expand Down Expand Up @@ -276,7 +287,11 @@ libbitcoin_server_a_SOURCES = \
rpc/net.cpp \
rpc/rawtransaction.cpp \
rpc/server.cpp \
rpc/zeronode.cpp \
rpc/zeronode-budget.cpp \
rpc/spork.cpp \
script/sigcache.cpp \
zeronode/sporkdb.cpp \
timedata.cpp \
torcontrol.cpp \
txdb.cpp \
Expand Down Expand Up @@ -307,6 +322,10 @@ endif
libbitcoin_wallet_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
libbitcoin_wallet_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
libbitcoin_wallet_a_SOURCES = \
zeronode/activezeronode.cpp \
zeronode/obfuscation.cpp \
utiltest.cpp \
utiltest.h \
zcbenchmarks.cpp \
zcbenchmarks.h \
wallet/asyncrpcoperation_mergetoaddress.cpp \
Expand All @@ -315,6 +334,13 @@ libbitcoin_wallet_a_SOURCES = \
wallet/crypter.cpp \
wallet/db.cpp \
wallet/paymentdisclosure.cpp \
zeronode/swifttx.cpp \
zeronode/zeronode.cpp \
zeronode/budget.cpp \
zeronode/payments.cpp \
zeronode/zeronode-sync.cpp \
zeronode/zeronodeconfig.cpp \
zeronode/zeronodeman.cpp \
wallet/paymentdisclosuredb.cpp \
wallet/rpcdisclosure.cpp \
wallet/rpcdump.cpp \
Expand Down Expand Up @@ -387,6 +413,8 @@ libbitcoin_common_a_SOURCES = \
script/script_error.cpp \
script/sign.cpp \
script/standard.cpp \
zeronode/spork.cpp \
zeronode/sporkdb.cpp \
transaction_builder.cpp \
utiltest.cpp \
$(BITCOIN_CORE_H) \
Expand Down
10 changes: 10 additions & 0 deletions src/bitcoind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "rpc/server.h"
#include "init.h"
#include "main.h"
#include "zeronode/zeronodeconfig.h"
#include "noui.h"
#include "scheduler.h"
#include "util.h"
Expand Down Expand Up @@ -128,6 +129,15 @@ bool AppInit(int argc, char* argv[])
return false;
}

//Start Zeronode
// parse zeronode.conf
std::string strErr;
if (!zeronodeConfig.read(strErr)) {
fprintf(stderr, "Error reading zeronode configuration file: %s\n", strErr.c_str());
return false;
}
//End Zeronode

// Command-line RPC
bool fCommandLine = false;
for (int i = 1; i < argc; i++)
Expand Down
21 changes: 21 additions & 0 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ class CMainParams : public CChainParams {
nEquihashN = N;
nEquihashK = K;

//Start Zeronode
nZeronodeCountDrift = 0;
strSporkKey = "0477f4d5094e70c26bf998ba0d0e06af8c31b399c5b794895da2158dac086260353c50eaf477e7c5ec6b87349fc63bacdd56f0ffe4dcc112dca71d8335cd1ad2c1";
strZeronodeDummyAddress = "t1TLNF3seMZennWmmxik8r1PVEKj5zudgRw";
nBudget_Fee_Confirmations = 6; // Number of confirmations for the finalization fee
//End Zeronode

genesis = CreateGenesisBlock(
1487500000,
uint256S("4c697665206c6f6e6720616e642070726f7370657221014592005a64336e336b"),
Expand Down Expand Up @@ -250,6 +257,13 @@ class CTestNetParams : public CChainParams {
nEquihashN = N;
nEquihashK = K;

//Start Zeronode
nZeronodeCountDrift = 0;
strSporkKey = "04f249a25f6708898afead4e01fc726269ffbdcbbecad7f675ed2470f68571e57ac32bde7111781e476b0c0256cc5e7b71cc5fd56fcffbfb1ead0cb6fe89d91303";
strZeronodeDummyAddress = "tmWuQ8Yh3pHDa8MingmN8ECPRBxo2n8uZRs";
nBudget_Fee_Confirmations = 6; // Number of confirmations for the finalization fee
//End Zeronode

genesis = CreateGenesisBlock(
1542244402,
uint256S("0000000000000000000000000000000000000000000000000000000000000007"),
Expand Down Expand Up @@ -388,6 +402,13 @@ class CRegTestParams : public CChainParams {
nEquihashN = N;
nEquihashK = K;

//Start Zeronode
nZeronodeCountDrift = 0;
strSporkKey = "045da9271f5d9df405d9e83c7c7e62e9c831cc85c51ffaa6b515c4f9c845dec4bf256460003f26ba9d394a17cb57e6759fe231eca75b801c20bccd19cbe4b7942d";
strZeronodeDummyAddress = "s1eQnJdoWDhKhxDrX8ev3aFjb1J6ZwXCxUT";
nBudget_Fee_Confirmations = 6; // Number of confirmations for the finalization fee
//End Zeronode

genesis = CreateGenesisBlock(
1531037936,
uint256S("0000000000000000000000000000000000000000000000000000000000000001"),
Expand Down
20 changes: 20 additions & 0 deletions src/chainparams.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,17 @@ class CChainParams
const std::string& Bech32HRP(Bech32Type type) const { return bech32HRPs[type]; }
const std::vector<SeedSpec6>& FixedSeeds() const { return vFixedSeeds; }
const CCheckpointData& Checkpoints() const { return checkpointData; }

/** Start Zeronode **/
/** The zeronode count that we will allow the see-saw reward payments to be off by */
int ZeronodeCountDrift() const { return nZeronodeCountDrift; }
std::string SporkKey() const { return strSporkKey; }
std::string ZeronodeDummyAddress() const { return strZeronodeDummyAddress; }
/** Headers first syncing is disabled */
bool HeadersFirstSyncingActive() const { return fHeadersFirstSyncingActive; };
int64_t Budget_Fee_Confirmations() const { return nBudget_Fee_Confirmations; }
/**End Zeronode **/

/** Return the founder's reward address and script for a given block height */
std::string GetFoundersRewardAddressAtHeight(int height) const;
CScript GetFoundersRewardScriptAtHeight(int height) const;
Expand Down Expand Up @@ -128,6 +139,15 @@ class CChainParams
bool fRequireStandard = false;
bool fMineBlocksOnDemand = false;
bool fTestnetToBeDeprecatedFieldRPC = false;

/** Start Zeronode **/
int nZeronodeCountDrift;
std::string strSporkKey;
bool fHeadersFirstSyncingActive;
std::string strZeronodeDummyAddress;
int64_t nBudget_Fee_Confirmations;
/** Start Zeronode **/

CCheckpointData checkpointData;
std::vector<std::string> vFoundersRewardAddress;

Expand Down
Loading

0 comments on commit 56f8f2a

Please sign in to comment.