Merge branch 'dev' into duke
This commit is contained in:
@@ -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, 2)
|
||||
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)))
|
||||
|
||||
5
contrib/asmap/README.md
Normal file
5
contrib/asmap/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# asmap stuff
|
||||
|
||||
Files relating to -asmap=... feature, to use ASNs
|
||||
|
||||
Originally from https://github.com/sipa/asmap/blob/master/demo.map
|
||||
BIN
contrib/asmap/asmap.dat
Normal file
BIN
contrib/asmap/asmap.dat
Normal file
Binary file not shown.
@@ -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,
|
||||
|
||||
@@ -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"
|
||||
.TH HUSH-CLI "1" "February 2021" "hush-cli v3.6.2" "User Commands"
|
||||
.SH NAME
|
||||
hush-cli \- manual page for hush-cli v3.6.1
|
||||
hush-cli \- manual page for hush-cli v3.6.2
|
||||
.SH DESCRIPTION
|
||||
Hush RPC client version v3.6.1\-cf5736569\-dirty
|
||||
Hush RPC client version v3.6.2\-e2e6e44ca\-dirty
|
||||
.PP
|
||||
In order to ensure you are adequately protecting your privacy when using Hush,
|
||||
please see <https://hush.is/security/>.
|
||||
|
||||
@@ -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"
|
||||
.TH HUSH-TX "1" "February 2021" "hush-tx v3.6.2" "User Commands"
|
||||
.SH NAME
|
||||
hush-tx \- manual page for hush-tx v3.6.1
|
||||
hush-tx \- manual page for hush-tx v3.6.2
|
||||
.SH DESCRIPTION
|
||||
hush\-tx utility version v3.6.1\-cf5736569\-dirty
|
||||
hush\-tx utility version v3.6.2\-e2e6e44ca\-dirty
|
||||
.SS "Usage:"
|
||||
.TP
|
||||
hush\-tx [options] <hex\-tx> [commands]
|
||||
|
||||
@@ -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"
|
||||
.TH HUSHD "1" "February 2021" "hushd v3.6.2" "User Commands"
|
||||
.SH NAME
|
||||
hushd \- manual page for hushd v3.6.1
|
||||
hushd \- manual page for hushd v3.6.2
|
||||
.SH DESCRIPTION
|
||||
Hush Daemon version v3.6.1\-cf5736569\-dirty
|
||||
Hush Daemon version v3.6.2\-e2e6e44ca\-dirty
|
||||
.PP
|
||||
In order to ensure you are adequately protecting your privacy when using Hush,
|
||||
please see <https://hush.is/security/>.
|
||||
@@ -37,7 +37,7 @@ How thorough the block verification of \fB\-checkblocks\fR is (0\-4, default: 3)
|
||||
.HP
|
||||
\fB\-clientname=\fR<SomeName>
|
||||
.IP
|
||||
Full node client name, default 'MagicBean'
|
||||
Full node client name, default 'GoldenSandtrout'
|
||||
.HP
|
||||
\fB\-conf=\fR<file>
|
||||
.IP
|
||||
@@ -143,7 +143,7 @@ Add a node to connect to and attempt to keep the connection open
|
||||
\fB\-asmap=\fR<file>
|
||||
.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<n>
|
||||
|
||||
@@ -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,42 @@ 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")),
|
||||
(int64_t) 1613879454, // time of last checkpointed block
|
||||
(int64_t) 752357, // total txs
|
||||
(double) 1187 // txs in the last day before block 434429
|
||||
};
|
||||
} else {
|
||||
checkpointData = //(Checkpoints::CCheckpointData)
|
||||
|
||||
@@ -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 2
|
||||
#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
|
||||
|
||||
|
||||
@@ -86,6 +86,7 @@ $KMD -ac_name=$NAME \
|
||||
-ac_supply=$SUPPLY \
|
||||
-ac_perc=$PERC \
|
||||
-clientname=$CLIENTNAME \
|
||||
-asmap \
|
||||
-addnode=$NODE1 \
|
||||
-addnode=$NODE2 \
|
||||
-addnode=$NODE3 \
|
||||
|
||||
15
src/init.cpp
15
src/init.cpp
@@ -122,7 +122,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,8 +1089,15 @@ 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 filepath, use the default in contrib
|
||||
if (asmap_path.empty()) {
|
||||
asmap_path = DEFAULT_ASMAP_FILENAME;
|
||||
asmap_path = contrib / DEFAULT_ASMAP_FILENAME;
|
||||
}
|
||||
if (!asmap_path.is_absolute()) {
|
||||
asmap_path = GetDataDir() / asmap_path;
|
||||
@@ -1105,10 +1112,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());
|
||||
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)) {
|
||||
|
||||
@@ -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"
|
||||
|
||||
12
src/util.cpp
12
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 <char> 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
|
||||
|
||||
Reference in New Issue
Block a user