merge downstream 0.11.1

This commit is contained in:
vertoe 2015-02-06 15:00:12 +01:00
commit 06c7aa1e6e
7 changed files with 28 additions and 11 deletions

View File

@ -3,7 +3,7 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 11)
define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_BUILD, 10)
define(_CLIENT_VERSION_BUILD, 11)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2015)
AC_INIT([Darkcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@darkcoin.io],[darkcoin])

View File

@ -12,7 +12,7 @@
#define CLIENT_VERSION_MAJOR 0
#define CLIENT_VERSION_MINOR 11
#define CLIENT_VERSION_REVISION 1
#define CLIENT_VERSION_BUILD 10
#define CLIENT_VERSION_BUILD 11

View File

@ -19,8 +19,13 @@ static const int64_t DARKSEND_COLLATERAL = (0.1*COIN);
static const int64_t DARKSEND_FEE = (0.0125*COIN);
static const int64_t DARKSEND_POOL_MAX = (999.99*COIN);
#define INSTANTX_SIGNATURES_REQUIRED 6
#define INSTANTX_SIGNATURES_TOTAL 10
/*
At 15 signatures, 1/2 of the masternode network can be owned by
one party without comprimising the security of InstantX
(1000/2150.0)**15 = 1.031e-05
*/
#define INSTANTX_SIGNATURES_REQUIRED 15
#define INSTANTX_SIGNATURES_TOTAL 20
#define MASTERNODE_NOT_PROCESSED 0 // initial state
#define MASTERNODE_IS_CAPABLE 1

View File

@ -222,7 +222,7 @@ class CDarksendSession
class CDarkSendPool
{
public:
static const int MIN_PEER_PROTO_VERSION = 70060;
static const int MIN_PEER_PROTO_VERSION = 70061;
// clients entries
std::vector<CDarkSendEntry> myEntries;

View File

@ -232,7 +232,7 @@ int64_t CreateNewLock(CTransaction tx)
CTransactionLock newLock;
newLock.nBlockHeight = nBlockHeight;
newLock.nExpiration = GetTime()+(60*15); //locks expire after 15 minutes (6 confirmations)
newLock.nExpiration = GetTime()+(60*60); //locks expire after 15 minutes (6 confirmations)
newLock.nTimeout = GetTime()+(60*5);
newLock.txHash = tx.GetHash();
mapTxLocks.insert(make_pair(tx.GetHash(), newLock));
@ -249,10 +249,25 @@ void DoConsensusVote(CTransaction& tx, int64_t nBlockHeight)
{
if(!fMasterNode) return;
int n = GetMasternodeRank(activeMasternode.vin, nBlockHeight, MIN_INSTANTX_PROTO_VERSION);
if(n == -1)
{
LogPrintf("InstantX::DoConsensusVote - Unknown Masternode\n");
return;
}
if(n > INSTANTX_SIGNATURES_TOTAL)
{
LogPrintf("InstantX::DoConsensusVote - Masternode not in the top %d (%d)\n", INSTANTX_SIGNATURES_TOTAL, n);
return;
}
/*
nBlockHeight calculated from the transaction is the authoritive source
*/
LogPrintf("InstantX::DoConsensusVote - In the top %d (%d)\n", INSTANTX_SIGNATURES_TOTAL, n);
CConsensusVote ctx;
ctx.vinMasternode = activeMasternode.vin;
ctx.txHash = tx.GetHash();
@ -541,9 +556,6 @@ void CTransactionLock::AddSignature(CConsensusVote cv)
int CTransactionLock::CountSignatures()
{
return 10;
/*
Only count signatures where the BlockHeight matches the transaction's blockheight.
The votes have no proof it's the correct blockheight

View File

@ -23,7 +23,7 @@ class CConsensusVote;
class CTransaction;
class CTransactionLock;
static const int MIN_INSTANTX_PROTO_VERSION = 70060;
static const int MIN_INSTANTX_PROTO_VERSION = 70061;
extern map<uint256, CTransaction> mapTxLockReq;
extern map<uint256, CTransactionLock> mapTxLocks;

View File

@ -27,7 +27,7 @@ extern const std::string CLIENT_DATE;
// network protocol versioning
//
static const int PROTOCOL_VERSION = 70060;
static const int PROTOCOL_VERSION = 70061;
// intial proto version, to be increased after version/verack negotiation
static const int INIT_PROTO_VERSION = 209;