diff --git a/INSTALL.md b/INSTALL.md
index 0c4095e5c..0b2f084e7 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -4,7 +4,7 @@
To install a Debian package:
- dpkg -i hush-3.5.0-amd4.deb
+ dpkg -i hush-3.6.2-amd4.deb
To uninstall:
@@ -42,6 +42,18 @@ cd hush3
./build.sh -j$(nproc)
```
+## Building On Ubuntu 16.04 and older systems
+
+Some older compilers may not be able to compile modern code, such as gcc 5.4 which comes with Ubuntu 16.04 by default. Here is how to install gcc 7 on Ubuntu 16.04. Run these commands as root:
+
+```
+add-apt-repository ppa:ubuntu-toolchain-r/test && \
+apt update && \
+apt-get install -y gcc-7 g++-7 && \
+ update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 60 && \
+ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60
+```
+
## Run a HUSH Node
```sh
diff --git a/configure.ac b/configure.ac
index 5f62a6e5e..216f612bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 3)
define(_CLIENT_VERSION_MINOR, 6)
-define(_CLIENT_VERSION_REVISION, 1)
+define(_CLIENT_VERSION_REVISION, 3)
define(_CLIENT_VERSION_BUILD, 50)
define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50)))
define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1)))
diff --git a/contrib/devtools/gen-linux-binary-release.sh b/contrib/devtools/gen-linux-binary-release.sh
index a8ae359cb..6d03d656d 100755
--- a/contrib/devtools/gen-linux-binary-release.sh
+++ b/contrib/devtools/gen-linux-binary-release.sh
@@ -1,15 +1,25 @@
#!/bin/bash
-# Copyright (c) 2016-2020 The Hush developers
+# Copyright (c) 2016-2021 The Hush developers
# Released under the GPLv3
-#TODO: autodect version number, error handling
-FILE="hush-3.6.0-linux-amd64.tar"
+set -e
+set -x
+#hardcode and uncomment if hushd is not running on this machine
+#VERSION=3.6.3
+VERSION=$(./src/hushd --version|grep version|cut -d' ' -f4|cut -d- -f1|sed 's/v//g')
+FILE="hush-$VERSION-linux-amd64.tar"
+TIME=$(perl -e 'print time')
+
+mv build build.$TIME
mkdir build
+cp contrib/asmap/asmap.dat build/
cp sapling*.params build/
cd src
cp komodod komodo-cli komodo-tx hushd hush-cli hush-tx hush-smart-chain ../build
cd ../build
+strip komodo*
tar -f $FILE -c *
-gzip $FILE
-
+gzip -9 $FILE
+sha256sum *.gz
+du -sh *.gz
diff --git a/contrib/devtools/gen-manpages.sh b/contrib/devtools/gen-manpages.sh
index 494f8da68..4acce0959 100755
--- a/contrib/devtools/gen-manpages.sh
+++ b/contrib/devtools/gen-manpages.sh
@@ -12,8 +12,9 @@ HUSHTX=${HUSHTX:-$SRCDIR/hush-tx}
[ ! -x $HUSHD ] && echo "$HUSHD not found or not executable." && exit 1
-HUSHVER="v3.6.1"
-#HUSHVER=$(./src/hushd --version|head -n2|tail -n1|cut -d' ' -f4|cut -d- -f1)
+# use this if hushd is not running
+#HUSHVER="v3.6.2"
+HUSHVER=$(./src/hushd --version|head -n1|cut -d' ' -f4|cut -d- -f1)
# Create a footer file with copyright content.
# This gets autodetected fine for hushd if --version-string is not set,
diff --git a/depends/packages/wolfssl.mk b/depends/packages/wolfssl.mk
index 07f235838..d1e9ac08c 100644
--- a/depends/packages/wolfssl.mk
+++ b/depends/packages/wolfssl.mk
@@ -50,7 +50,7 @@ endef
#endef
define $(package)_build_cmds
- $(MAKE) -j1 src/libwolfssl.la
+ $(MAKE) CPPFLAGS='-fPIC' -j1 src/libwolfssl.la
endef
define $(package)_stage_cmds
diff --git a/doc/man/hush-cli.1 b/doc/man/hush-cli.1
index 53029b0f3..9cb47f7a1 100644
--- a/doc/man/hush-cli.1
+++ b/doc/man/hush-cli.1
@@ -1,9 +1,9 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.10.
-.TH HUSH-CLI "1" "January 2021" "hush-cli v3.6.1" "User Commands"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
+.TH HUSH-CLI "1" "February 2021" "hush-cli v3.6.3" "User Commands"
.SH NAME
-hush-cli \- manual page for hush-cli v3.6.1
+hush-cli \- manual page for hush-cli v3.6.3
.SH DESCRIPTION
-Hush RPC client version v3.6.1\-cf5736569\-dirty
+Hush RPC client version v3.6.3\-e1d5c5b73
.PP
In order to ensure you are adequately protecting your privacy when using Hush,
please see .
diff --git a/doc/man/hush-tx.1 b/doc/man/hush-tx.1
index 178d7eb09..c382b4cff 100644
--- a/doc/man/hush-tx.1
+++ b/doc/man/hush-tx.1
@@ -1,9 +1,9 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.10.
-.TH HUSH-TX "1" "January 2021" "hush-tx v3.6.1" "User Commands"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
+.TH HUSH-TX "1" "February 2021" "hush-tx v3.6.3" "User Commands"
.SH NAME
-hush-tx \- manual page for hush-tx v3.6.1
+hush-tx \- manual page for hush-tx v3.6.3
.SH DESCRIPTION
-hush\-tx utility version v3.6.1\-cf5736569\-dirty
+hush\-tx utility version v3.6.3\-e1d5c5b73
.SS "Usage:"
.TP
hush\-tx [options] [commands]
diff --git a/doc/man/hushd.1 b/doc/man/hushd.1
index 2d5e5d2e5..3f9d28186 100644
--- a/doc/man/hushd.1
+++ b/doc/man/hushd.1
@@ -1,9 +1,9 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.10.
-.TH HUSHD "1" "January 2021" "hushd v3.6.1" "User Commands"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
+.TH HUSHD "1" "February 2021" "hushd v3.6.3" "User Commands"
.SH NAME
-hushd \- manual page for hushd v3.6.1
+hushd \- manual page for hushd v3.6.3
.SH DESCRIPTION
-Hush Daemon version v3.6.1\-cf5736569\-dirty
+Hush Daemon version v3.6.3\-e1d5c5b73
.PP
In order to ensure you are adequately protecting your privacy when using Hush,
please see .
@@ -37,7 +37,7 @@ How thorough the block verification of \fB\-checkblocks\fR is (0\-4, default: 3)
.HP
\fB\-clientname=\fR
.IP
-Full node client name, default 'MagicBean'
+Full node client name, default 'GoldenSandtrout'
.HP
\fB\-conf=\fR
.IP
@@ -75,7 +75,7 @@ limit applied)
.HP
\fB\-par=\fR
.IP
-Set the number of script verification threads (\fB\-8\fR to 16, 0 = auto, <0 =
+Set the number of script verification threads (\fB\-16\fR to 16, 0 = auto, <0 =
leave that many cores free, default: 0)
.HP
\fB\-pid=\fR
@@ -143,7 +143,7 @@ Add a node to connect to and attempt to keep the connection open
\fB\-asmap=\fR
.IP
Specify asn mapping used for bucketing of the peers (default:
-ip_asn.map). Relative paths will be prefixed by the net\-specific datadir
+asmap.dat). Relative paths will be prefixed by the net\-specific datadir
location.
.HP
\fB\-banscore=\fR
diff --git a/src/Makefile.am b/src/Makefile.am
index 1eb56ec24..0711b52cc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright 2016-2020 The Hush developers
+# Copyright 2016-2021 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
@@ -483,8 +483,8 @@ nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
# komodod binary #
komodod_SOURCES = bitcoind.cpp
-komodod_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
-komodod_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
+komodod_CPPFLAGS = -fPIC $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
+komodod_CXXFLAGS = -fPIC $(AM_CXXFLAGS) $(PIE_FLAGS)
komodod_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
if TARGET_WINDOWS
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index b956ec17f..e44b1643c 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -557,7 +557,7 @@ void *chainparams_commandline() {
{
boost::assign::map_list_of
(0, pCurrentParams->consensus.hashGenesisBlock)
- // Generated at 1600532337 via hush3 contrib/checkpoints.pl by Duke Leto
+ // Last updated at 1613482505 via hush3 contrib/checkpoints.pl by Duke Leto
(5000, uint256S("0x000000018f8543066baa9c5f83e981749da4cb625fad02c187b4a9c4693ebd60"))
(10000, uint256S("0x00000002d177d1cbfeaf7c27a2a32766ea9063d222cbcc7623dc08355b07a3ad"))
(15000, uint256S("0x000000008dbfbd5d5e27d819bf2989c5658c3494608bfa1320ad0b090660cd44"))
@@ -690,10 +690,48 @@ void *chainparams_commandline() {
(399000, uint256S("0x0000000d6741914a85e696364cda252340747a3b47f955b99c29e8163192c4cb"))
(400000, uint256S("0x00000004956ccd26d7532b6bf229777675f326523b904f4e1f40b9535a124641"))
(401000, uint256S("0x0000000a974824aa14a61c3b442a15d6bdf0aaa75f5c280d94e43898ef143463"))
- (402000, uint256S("0x0000000c071f67605a6764573fd6524fd90628f9ea339ff55c7a20567093251e")),
- (int64_t) 1611465410, // time of last checkpointed block
- (int64_t) 708317, // total txs
- (double) 1540 // txs in the last day before block 402232
+ (402000, uint256S("0x0000000c071f67605a6764573fd6524fd90628f9ea339ff55c7a20567093251e"))
+ (403000, uint256S("0x00000000532805ef6cb2c755149a7fbf8b855528fcb513942fa7f5463bfc6cc4"))
+ (404000, uint256S("0x00000000a2638bf8b0a48d705b117f9ce7457e6fab16b16f70c66d9a50390a53"))
+ (405000, uint256S("0x0000001cb3b08ce66003deb4d05182ef6f74e4e17dceaf3fd272184cbc6118a4"))
+ (406000, uint256S("0x0000001292e18ce355fd9c608b029cf16ef459c47503899db896ea5aebf78e34"))
+ (407000, uint256S("0x0000000efdeebe216c58ac94d9d9bc5aa0d772509e98a256014ecfe1002d31d3"))
+ (408000, uint256S("0x00000009a0d66c11cc08a8f1d96c7acbd0a97165176045421eba3bc017a42e93"))
+ (409000, uint256S("0x00000001df73a93028f836593d32511b047e3f4abd73fb92db02809c751457cb"))
+ (410000, uint256S("0x0000000306911b54cfec6f566e0b8bed99a177ed10e4cc4ca9ff855c906e4b73"))
+ (411000, uint256S("0x0000000b273b786e21e636c40d4c979b754e97eb3ce9e76d22b8a1901f74a46a"))
+ (412000, uint256S("0x0000000e850a5c492e1aa8137a721b650297bc599886167def5663abe5804315"))
+ (413000, uint256S("0x00000005d8c4d2404a301aa254302e70d7f74dde1661279a1f55c0009c48bc94"))
+ (414000, uint256S("0x000000197263852a1d5f46fa495853723393a36e9c35230c681619aeb9935bf9"))
+ (415000, uint256S("0x000000119792e3de106d9cd0a91bb922ca1e2717816cd3d3b350578c99985698"))
+ (416000, uint256S("0x00000005b112e5e5adc86b0dd453cf55038656c0fad340c3a5177923d2f4b0cd"))
+ (417000, uint256S("0x0000001e947478180ca348d8b6ae653727092327d592d25dbde33fd1cf4ed8cb"))
+ (418000, uint256S("0x00000018ea0c59fcb9ef2946f6b44eae6794da0a9fa2327258748c5ff0d1ad0d"))
+ (419000, uint256S("0x0000001dee9250903e8c2bea76ac144dc2dbbeca60d7041dcd5706597ddd5e38"))
+ (420000, uint256S("0x000000047d784123e1ac2a5b7687b72a8bcf0ff43b02d71db52f7c8f967e3179"))
+ (421000, uint256S("0x00000015f35a10a8baefd4f0291742f68f84ce0417491c4be3a006cb4c3959e9"))
+ (422000, uint256S("0x00000004f8fb248fc0e9bf3d99e5379a8e8120c18357f52eabc74553deb7b1c5"))
+ (423000, uint256S("0x00000010239e5fc5489d350496950b27ab5f34e3774c424a12353bba7440d78e"))
+ (424000, uint256S("0x0000000a43a0a4a68b2cd61d20065eea7d8a27c20d64555c8320cd4a45d769e7"))
+ (425000, uint256S("0x000000104d409a2b87617ad6f7638d5000b6ec8aad5f54dee6d6b13e0f7f66b3"))
+ (426000, uint256S("0x0000000bdddcaaa58568a7d5da4380c5735b9d9374e8e393e14303fca51e374f"))
+ (427000, uint256S("0x00000002195dafd6ba01b4089c55e35521fed90bf95420abdb73e9edb0c7e779"))
+ (428000, uint256S("0x00000002ea968e35749a7f41c52e61b0f4635384020a82282d997594b017d446"))
+ (429000, uint256S("0x00000007e213a5778b3a942016a7d7576c6c141f913342a1f627417c4f334224"))
+ (430000, uint256S("0x0000000f827d7a004367c15c973814cc47e32287b727ebe3a4cb581703979593"))
+ (431000, uint256S("0x0000000d709ec810da6a2f55ff5d10bff9a5580ffe4fee8ce27abaf175cb6312"))
+ (432000, uint256S("0x000000007d91ea56e7e129991aa33e57224d0f898a5a46b02efb81f40aae5ed8"))
+ (433000, uint256S("0x00000009da7df1aad22c96ed458fa7feae1216811568fb0e9c2f09db25dee3f0"))
+ (434000, uint256S("0x0000001003f3460d4b0414f94e35025c76f72b8607e0ea00c7790e10172ef8e3"))
+ (435000, uint256S("0x0000001c399778d54b821c0622087149f39ee688e80bb88b6960ec6e42788918"))
+ (436000, uint256S("0x0000000c4e21e0ac0f9541357c1a3ce483fd2dd210874ca930dc5b271c7e6b21"))
+ (437000, uint256S("0x00000003ce6d4b0ea02f483633abae9da2b71e62e14e08f20af13452ab6814a7"))
+ (438000, uint256S("0x0000000d845b717aec3b273f9cb2d894d3caa05f91b3ad41b6581adfd90b267c"))
+ (439000, uint256S("0x000000099a44794ccf54bcba10780b163b6a369292263df1d8d62d2d58cc7cea"))
+ (440000, uint256S("0x0000000b741bda60e14a5d668581f60bfb852b09249428ca7c3a59b01db31af0")),
+ (int64_t) 1614333866, // time of last checkpointed block
+ (int64_t) 759609, // total txs
+ (double) 1606 // txs in the last day before block 440133
};
} else {
checkpointData = //(Checkpoints::CCheckpointData)
diff --git a/src/clientversion.h b/src/clientversion.h
index f7aeedc3f..b2f606f64 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -1,6 +1,6 @@
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Copyright (c) 2016-2017 The Zcash developers
-// Copyright (c) 2016-2020 The Hush developers
+// Copyright (c) 2016-2021 The Hush developers
// Distributed under the GPLv3 software license, see the accompanying
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
/******************************************************************************
@@ -26,11 +26,11 @@
// client versioning and copyright year
//! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it
-// Must be kept in sync with configure.ac !
+// Must be kept in sync with configure.ac , ugh!
#define CLIENT_VERSION_MAJOR 3
#define CLIENT_VERSION_MINOR 6
-#define CLIENT_VERSION_REVISION 1
-#define CLIENT_VERSION_BUILD 25
+#define CLIENT_VERSION_REVISION 3
+#define CLIENT_VERSION_BUILD 50
//! Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
@@ -39,7 +39,7 @@
* Copyright year (2009-this)
* Todo: update this when changing our copyright comments in the source
*/
-#define COPYRIGHT_YEAR 2020
+#define COPYRIGHT_YEAR 2021
#endif //HAVE_CONFIG_H
diff --git a/src/hushd b/src/hushd
index ee773e005..477477d49 100755
--- a/src/hushd
+++ b/src/hushd
@@ -86,6 +86,7 @@ $KMD -ac_name=$NAME \
-ac_supply=$SUPPLY \
-ac_perc=$PERC \
-clientname=$CLIENTNAME \
+ -asmap \
-addnode=$NODE1 \
-addnode=$NODE2 \
-addnode=$NODE3 \
diff --git a/src/init.cpp b/src/init.cpp
index 0c1937b88..2624945bf 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1,8 +1,10 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin Core developers
-// Copyright (c) 2016-2020 The Hush developers
+// Copyright (c) 2016-2021 The Hush developers
// Distributed under the GPLv3 software license, see the accompanying
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
+// What happened to the SuperNET devs, who were dedicated to privacy???
+// Did they go the way of the dodo when they embraced KYC?
/******************************************************************************
* Copyright © 2014-2019 The SuperNET Developers. *
* *
@@ -122,7 +124,7 @@ enum BindFlags {
static const char* FEE_ESTIMATES_FILENAME="fee_estimates.dat";
-static const char* DEFAULT_ASMAP_FILENAME="ip_asn.map";
+static const char* DEFAULT_ASMAP_FILENAME="asmap.dat";
CClientUIInterface uiInterface; // Declared but not defined in ui_interface.h
@@ -1089,12 +1091,58 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
// Read asmap file if configured
if (mapArgs.count("-asmap")) {
fs::path asmap_path = fs::path(GetArg("-asmap", ""));
+
+ char cwd[1024];
+ bool ret = getcwd(cwd, sizeof(cwd));
+ fs::path pwd = fs::path(cwd);
+ fs::path contrib = pwd / ".." / "contrib" / "asmap";
+
+ // If no asmap given (default), look for one
+ // First we look in PWD, the most common case (binaries)
+ // Then we look in /usr/share/hush, for Debian packages
+ // then we look in ../contrib/asmap/ for compiling from source case
+ // finally we try the parent directory .. as a last resort
+ // if no asmap can be found, something is wrong, and we exit
if (asmap_path.empty()) {
- asmap_path = DEFAULT_ASMAP_FILENAME;
- }
- if (!asmap_path.is_absolute()) {
- asmap_path = GetDataDir() / asmap_path;
+ // Most binaries will have it in PWD
+ asmap_path = pwd / DEFAULT_ASMAP_FILENAME;
+ printf("%s: looking for asmap file at %s\n", __func__, asmap_path.c_str() );
+ if(fs::exists(asmap_path)) {
+ printf("%s: found asmap file at %s\n", __func__, asmap_path.c_str() );
+ } else {
+ // Debian Packages
+ asmap_path = fs::path("/usr/share/hush") / DEFAULT_ASMAP_FILENAME;
+ printf("%s: looking for asmap file at %s\n", __func__, asmap_path.c_str() );
+ if(fs::exists(asmap_path)) {
+ printf("%s: found asmap file at %s\n", __func__, asmap_path.c_str() );
+ } else {
+ // Source code
+ asmap_path = contrib / DEFAULT_ASMAP_FILENAME;
+ printf("%s: looking for asmap file at %s\n", __func__, asmap_path.c_str() );
+ if(fs::exists(asmap_path)) {
+ printf("%s: found asmap file at %s\n", __func__, asmap_path.c_str() );
+ } else {
+ // Last Resort: Check the parent directory
+ asmap_path = pwd / ".." / DEFAULT_ASMAP_FILENAME;
+ printf("%s: looking for asmap file at %s\n", __func__, asmap_path.c_str() );
+ if(fs::exists(asmap_path)) {
+ printf("%s: found asmap file at %s\n", __func__, asmap_path.c_str() );
+ } else {
+ // Shit is fucked up, die an honorable death
+ InitError(strprintf(_("Could not find any asmap file! Please report this bug to Hush Developers")));
+ return false;
+ }
+ }
+ }
+ }
+ } else {
+ if (!asmap_path.is_absolute()) {
+ asmap_path = GetDataDir() / asmap_path;
+ }
+ printf("%s: looking for custom asmap file at %s\n", __func__, asmap_path.c_str() );
}
+
+ //TODO: verify asmap_path is not a directory
if (!fs::exists(asmap_path)) {
InitError(strprintf(_("Could not find asmap file %s"), asmap_path));
return false;
@@ -1105,10 +1153,12 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
return false;
}
const uint256 asmap_version = SerializeHash(asmap);
+ printf("%s: asmap version=%s with %lu mappings\n", __func__, asmap_version.ToString().c_str(), asmap.size());
+ LogPrintf("Using asmap version %s for IP bucketing with %lu mappings\n", asmap_version.ToString(), asmap.size());
addrman.m_asmap = std::move(asmap); // //node.connman->SetAsmap(std::move(asmap));
- LogPrintf("Using asmap version %s for IP bucketing\n", asmap_version.ToString());
+
} else {
- LogPrintf("Using /16 prefix for IP bucketing\n");
+ LogPrintf("Using /16 prefix for IP bucketing, but why?\n");
}
if (GetBoolArg("-salvagewallet", false)) {
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp
index 49498bc93..46c3cf24d 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -1,8 +1,7 @@
// Copyright (c) 2009-2014 The Bitcoin Core developers
-// Copyright (c) 2016-2020 The Hush developers
+// Copyright (c) 2016-2021 The Hush developers
// Distributed under the GPLv3 software license, see the accompanying
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
-
/******************************************************************************
* Copyright © 2014-2019 The SuperNET Developers. *
* *
@@ -241,8 +240,8 @@ UniValue addnode(const UniValue& params, bool fHelp, const CPubKey& mypk)
"1. \"node\" (string, required) The node (see getpeerinfo for nodes)\n"
"2. \"command\" (string, required) 'add' to add a node to the list, 'remove' to remove a node from the list, 'onetry' to try a connection to the node once\n"
"\nExamples:\n"
- + HelpExampleCli("addnode", "\"192.168.0.6:8233\" \"onetry\"")
- + HelpExampleRpc("addnode", "\"192.168.0.6:8233\", \"onetry\"")
+ + HelpExampleCli("addnode", "\"192.168.0.6:18030\" \"onetry\"")
+ + HelpExampleRpc("addnode", "\"192.168.0.6:18030\", \"onetry\"")
);
string strNode = params[0].get_str();
@@ -285,8 +284,8 @@ UniValue disconnectnode(const UniValue& params, bool fHelp, const CPubKey& mypk)
"\nArguments:\n"
"1. \"node\" (string, required) The node (see getpeerinfo for nodes)\n"
"\nExamples:\n"
- + HelpExampleCli("disconnectnode", "\"192.168.0.6:8233\"")
- + HelpExampleRpc("disconnectnode", "\"192.168.0.6:8233\"")
+ + HelpExampleCli("disconnectnode", "\"192.168.0.6:18030\"")
+ + HelpExampleRpc("disconnectnode", "\"192.168.0.6:18030\"")
);
CNode* pNode = FindNode(params[0].get_str());
@@ -317,7 +316,7 @@ UniValue getaddednodeinfo(const UniValue& params, bool fHelp, const CPubKey& myp
" \"connected\" : true|false, (boolean) If connected\n"
" \"addresses\" : [\n"
" {\n"
- " \"address\" : \"192.168.0.201:8233\", (string) The Hush server host and port\n"
+ " \"address\" : \"192.168.0.201:18030\", (string) The Hush server host and port\n"
" \"connected\" : \"outbound\" (string) connection, inbound or outbound\n"
" }\n"
" ,...\n"
diff --git a/src/util.cpp b/src/util.cpp
index 9dea639b3..1f9383907 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -846,13 +846,13 @@ void AllocateFileRange(FILE *file, unsigned int offset, unsigned int length) {
void ShrinkDebugFile()
{
- fprintf(stderr,"Shrinking %s\n", GetDataDir().c_str() );
// Scroll debug.log if it's getting too big
boost::filesystem::path pathLog = GetDataDir() / "debug.log";
FILE* file = fopen(pathLog.string().c_str(), "r");
- unsigned int MAX_DEBUG_LOG_SIZE = 100*(1024*1024); // 100MB
- if (file && boost::filesystem::file_size(pathLog) > MAX_DEBUG_LOG_SIZE )
- {
+ int maxlogsize = GetArg("-maxdebugfilesize", 15);
+ unsigned int MAX_DEBUG_LOG_SIZE = maxlogsize*(1024*1024); // convert to MB
+ if (file && boost::filesystem::file_size(pathLog) > MAX_DEBUG_LOG_SIZE ) {
+ fprintf(stderr,"Shrinking %s to be at most %d bytes\n", GetDataDir().c_str(), MAX_DEBUG_LOG_SIZE );
// Restart the file with some of the end
std::vector vch(200000,0);
fseek(file, -((long)vch.size()), SEEK_END);
@@ -865,9 +865,9 @@ void ShrinkDebugFile()
fwrite(begin_ptr(vch), 1, nBytes, file);
fclose(file);
}
- }
- else if (file != NULL)
+ } else if (file != NULL) {
fclose(file);
+ }
}
#ifdef _WIN32
diff --git a/src/version.h b/src/version.h
index 69c48d1a4..bc304b404 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1,5 +1,5 @@
// Copyright (c) 2012-2014 The Bitcoin Core developers
-// Copyright (c) 2016-2020 The Hush developers
+// Copyright (c) 2016-2021 The Hush developers
// Distributed under the GPLv3 software license, see the accompanying
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
/******************************************************************************
@@ -21,7 +21,7 @@
#define HUSH_VERSION_H
// network protocol versioning
-static const int PROTOCOL_VERSION = 1987420;
+static const int PROTOCOL_VERSION = 1987421;
//! initial proto version, to be increased after version/verack negotiation
static const int INIT_PROTO_VERSION = 209;
//! In this version, 'getheaders' was introduced.
diff --git a/zcutil/build-debian-package.sh b/zcutil/build-debian-package.sh
index 629a053d4..421129702 100755
--- a/zcutil/build-debian-package.sh
+++ b/zcutil/build-debian-package.sh
@@ -45,6 +45,7 @@ chmod 0755 -R $BUILD_DIR/*
#cp $SRC_DEB/prerm $BUILD_DIR/DEBIAN
# Copy binaries. We prefix our komodod binaries with hush- to prevent conflicting with
# a stock komodod or other flavors of KMD
+cp $SRC_PATH/contrib/asmap/asmap.dat $DEB_SHR
cp $SRC_PATH/sapling-spend.params $DEB_SHR
cp $SRC_PATH/sapling-output.params $DEB_SHR
cp $SRC_PATH/src/komodod $DEB_BIN/hush-komodod