Commit 83dc2e98 authored by squbs's avatar squbs

block validation issue fix and debug suppress

parent d5605143
......@@ -3,9 +3,9 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 14)
define(_CLIENT_VERSION_REVISION, 7)
define(_CLIENT_VERSION_BUILD, 2)
define(_CLIENT_VERSION_BUILD, 3)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2017)
define(_COPYRIGHT_YEAR, 2018)
define(_COPYRIGHT_HOLDERS,[%s developers])
define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[STRAKS]])
AC_INIT([STRAKS Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/straks/straks/issues],[straks],[https://straks.info/])
......
......@@ -19,7 +19,7 @@
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 14
#define CLIENT_VERSION_REVISION 7
#define CLIENT_VERSION_BUILD 1
#define CLIENT_VERSION_BUILD 3
//! Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
......
......@@ -9,7 +9,7 @@
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* Version Build */
#define CLIENT_VERSION_BUILD 2
#define CLIENT_VERSION_BUILD 3
/* Version is release */
#define CLIENT_VERSION_IS_RELEASE true
......@@ -33,7 +33,7 @@
#define COPYRIGHT_HOLDERS_SUBSTITUTION "STRAKS"
/* Copyright year */
#define COPYRIGHT_YEAR 2017
#define COPYRIGHT_YEAR 2018
/* Define to 1 to enable wallet functions */
#define ENABLE_WALLET 1
......
......@@ -1306,7 +1306,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
if (nVersion < MIN_PEER_PROTO_VERSION)
{
// disconnect from peers older than this proto version
LogPrintf("peer=%d using obsolete version %i; disconnecting\n", pfrom->id, nVersion);
if(fDebug) LogPrintf("peer=%d using obsolete version %i; disconnecting\n", pfrom->id, nVersion);
connman.PushMessage(pfrom, CNetMsgMaker(INIT_PROTO_VERSION).Make(NetMsgType::REJECT, strCommand, REJECT_OBSOLETE,
strprintf("Version must be %d or greater", MIN_PEER_PROTO_VERSION)));
pfrom->fDisconnect = true;
......@@ -2799,9 +2799,8 @@ bool ProcessMessages(CNode* pfrom, CConnman& connman, const std::atomic<bool>& i
PrintExceptionContinue(NULL, "ProcessMessages()");
}
if (!fRet) {
if (!fRet && fDebug)
LogPrintf("%s(%s, %u bytes) FAILED peer=%d\n", __func__, SanitizeString(strCommand), nMessageSize, pfrom->id);
}
LOCK(cs_main);
SendRejectsAndCheckIfBanned(pfrom, connman);
......
......@@ -3348,7 +3348,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, const Consensus::P
// checks that use witness data may be performed here.
// Size limits
if (block.vtx.empty() || block.vtx.size() > MAX_BLOCK_VTX|| ::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) > MAX_BLOCK_VTX)
if (block.vtx.empty() || block.vtx.size() > MAX_BLOCK_VTX || ::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) * WITNESS_SCALE_FACTOR > MAX_BLOCK_SERIALIZED_SIZE)
return state.DoS(100, false, REJECT_INVALID, "bad-blk-length", false, "size limits failed");
// First transaction must be coinbase, the rest must not be
......@@ -3663,7 +3663,7 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, const Co
// Max block base size limit
if (::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) > MaxBlockBaseSize(fSegwitSeasoned))
return state.DoS(100, false, REJECT_INVALID, "bad-blk-length", false, "size limits failed");
return state.DoS(100, false, REJECT_INVALID, "bad-blk-length", false, "non-segwit size limits failed");
// First block at fork must be large
if (fBIP102FirstBlock) {
......
......@@ -9,7 +9,7 @@
* network protocol versioning
*/
static const int PROTOCOL_VERSION = 70102;
static const int PROTOCOL_VERSION = 70103;
//! initial proto version, to be increased after version/verack negotiation
static const int INIT_PROTO_VERSION = 209;
......@@ -27,13 +27,13 @@ static const int MIN_POOL_PEER_PROTO_VERSION = 70110;
static const int MIN_BUDGET_PEER_PROTO_VERSION = 70110;
//! minimum peer version for masternode winner broadcasts
static const int MIN_MNW_PEER_PROTO_VERSION = 70101;
static const int MIN_MNW_PEER_PROTO_VERSION = 70102;
//! minimum peer version that can receive masternode payments
// V1 - Last protocol version before update
// V2 - Newest protocol version
static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70100;
static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70102;
static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70101;
static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70103;
//TODO-- ends
//! nTime field added to CAddress, starting with this version;
......
......@@ -437,8 +437,8 @@ UniValue sendtoaddress(const JSONRPCRequest& request)
bool fSubtractFeeFromAmount = false;
if (request.params.size() > 4)
fSubtractFeeFromAmount = request.params[4].get_bool();
bool fUseIX = false; //TODO--
bool fUseIX = false;
bool fUseDS = false;
if (request.params.size() > 5)
fUseIX = request.params[5].get_bool();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment