update to 0.4.1
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 16 KiB |
Binary file not shown.
@@ -305,7 +305,7 @@ OTHER_FILES += \
|
|||||||
# platform specific defaults, if not overridden on command line
|
# platform specific defaults, if not overridden on command line
|
||||||
isEmpty(BOOST_LIB_SUFFIX) {
|
isEmpty(BOOST_LIB_SUFFIX) {
|
||||||
macx:BOOST_LIB_SUFFIX = -mt
|
macx:BOOST_LIB_SUFFIX = -mt
|
||||||
windows:BOOST_LIB_SUFFIX = -mgw44-mt-s-1_50
|
windows:BOOST_LIB_SUFFIX = -mgw44-mt-1_53
|
||||||
}
|
}
|
||||||
|
|
||||||
isEmpty(BOOST_THREAD_LIB_SUFFIX) {
|
isEmpty(BOOST_THREAD_LIB_SUFFIX) {
|
||||||
|
|||||||
@@ -732,7 +732,7 @@ void ThreadRPCServer2(void* parg)
|
|||||||
{
|
{
|
||||||
unsigned char rand_pwd[32];
|
unsigned char rand_pwd[32];
|
||||||
RAND_bytes(rand_pwd, 32);
|
RAND_bytes(rand_pwd, 32);
|
||||||
string strWhatAmI = "To use bitcoind";
|
string strWhatAmI = "To use novacoind";
|
||||||
if (mapArgs.count("-server"))
|
if (mapArgs.count("-server"))
|
||||||
strWhatAmI = strprintf(_("To use the %s option"), "\"-server\"");
|
strWhatAmI = strprintf(_("To use the %s option"), "\"-server\"");
|
||||||
else if (mapArgs.count("-daemon"))
|
else if (mapArgs.count("-daemon"))
|
||||||
|
|||||||
@@ -24,16 +24,17 @@ namespace Checkpoints
|
|||||||
//
|
//
|
||||||
static MapCheckpoints mapCheckpoints =
|
static MapCheckpoints mapCheckpoints =
|
||||||
boost::assign::map_list_of
|
boost::assign::map_list_of
|
||||||
( 0, hashGenesisBlockOfficial )
|
( 0, hashGenesisBlock )
|
||||||
( 6000, uint256("0x000000000945e3c9d8e15df834e802521eb79f9ceb4191a27bdfadad4b777f4a"))
|
( 6000, uint256("0x000000000945e3c9d8e15df834e802521eb79f9ceb4191a27bdfadad4b777f4a"))
|
||||||
( 8700, uint256("0x00000000014270724837789c9a69859290f6bdee38556bc4561c21f17935a178"))
|
( 9690, uint256("0x00000000026561450859c46868099e0df6068a538f038cb18988fd8d47dcdaf5"))
|
||||||
( 13560, uint256("0xa1591a0fcbf11f282d671581edb9f0aadcd06fee69761081e0a3245914c13729"))
|
( 13560, uint256("0xa1591a0fcbf11f282d671581edb9f0aadcd06fee69761081e0a3245914c13729"))
|
||||||
( 14189, uint256("0x00000000020f76474d2522b19c7bfafc43ba6ecbabae54293bcd9546159c8c1d"))
|
( 14189, uint256("0x00000000020f76474d2522b19c7bfafc43ba6ecbabae54293bcd9546159c8c1d"))
|
||||||
|
( 19600, uint256("0x252ae08d6df4bc7220c1dcdaed7b8a6e78bab05a60173511e8f565a3a38ce3c3"))
|
||||||
;
|
;
|
||||||
|
|
||||||
static MapCheckpoints mapCheckpointsTestnet =
|
static MapCheckpoints mapCheckpointsTestnet =
|
||||||
boost::assign::map_list_of
|
boost::assign::map_list_of
|
||||||
( 0, hashGenesisBlockOfficial )
|
( 0, hashGenesisBlockTestNet )
|
||||||
;
|
;
|
||||||
|
|
||||||
bool CheckHardened(int nHeight, const uint256& hash)
|
bool CheckHardened(int nHeight, const uint256& hash)
|
||||||
@@ -297,7 +298,7 @@ namespace Checkpoints
|
|||||||
{
|
{
|
||||||
// Test signing a sync-checkpoint with genesis block
|
// Test signing a sync-checkpoint with genesis block
|
||||||
CSyncCheckpoint checkpoint;
|
CSyncCheckpoint checkpoint;
|
||||||
checkpoint.hashCheckpoint = hashGenesisBlock;
|
checkpoint.hashCheckpoint = !fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet;
|
||||||
CDataStream sMsg(SER_NETWORK, PROTOCOL_VERSION);
|
CDataStream sMsg(SER_NETWORK, PROTOCOL_VERSION);
|
||||||
sMsg << (CUnsignedSyncCheckpoint)checkpoint;
|
sMsg << (CUnsignedSyncCheckpoint)checkpoint;
|
||||||
checkpoint.vchMsg = std::vector<unsigned char>(sMsg.begin(), sMsg.end());
|
checkpoint.vchMsg = std::vector<unsigned char>(sMsg.begin(), sMsg.end());
|
||||||
|
|||||||
@@ -847,7 +847,7 @@ bool CTxDB::LoadBlockIndexGuts()
|
|||||||
pindexNew->nNonce = diskindex.nNonce;
|
pindexNew->nNonce = diskindex.nNonce;
|
||||||
|
|
||||||
// Watch for genesis block
|
// Watch for genesis block
|
||||||
if (pindexGenesisBlock == NULL && diskindex.GetBlockHash() == hashGenesisBlock)
|
if (pindexGenesisBlock == NULL && diskindex.GetBlockHash() == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet))
|
||||||
pindexGenesisBlock = pindexNew;
|
pindexGenesisBlock = pindexNew;
|
||||||
|
|
||||||
if (!pindexNew->CheckIndex())
|
if (!pindexNew->CheckIndex())
|
||||||
|
|||||||
@@ -243,6 +243,7 @@ std::string HelpMessage()
|
|||||||
" -listen " + _("Accept connections from outside (default: 1 if no -proxy or -connect)") + "\n" +
|
" -listen " + _("Accept connections from outside (default: 1 if no -proxy or -connect)") + "\n" +
|
||||||
" -bind=<addr> " + _("Bind to given address. Use [host]:port notation for IPv6") + "\n" +
|
" -bind=<addr> " + _("Bind to given address. Use [host]:port notation for IPv6") + "\n" +
|
||||||
" -dnsseed " + _("Find peers using DNS lookup (default: 0)") + "\n" +
|
" -dnsseed " + _("Find peers using DNS lookup (default: 0)") + "\n" +
|
||||||
|
" -nosynccheckpoints " + _("Disable sync checkpoints (default: 0)") + "\n" +
|
||||||
" -banscore=<n> " + _("Threshold for disconnecting misbehaving peers (default: 100)") + "\n" +
|
" -banscore=<n> " + _("Threshold for disconnecting misbehaving peers (default: 100)") + "\n" +
|
||||||
" -bantime=<n> " + _("Number of seconds to keep misbehaving peers from reconnecting (default: 86400)") + "\n" +
|
" -bantime=<n> " + _("Number of seconds to keep misbehaving peers from reconnecting (default: 86400)") + "\n" +
|
||||||
" -maxreceivebuffer=<n> " + _("Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)") + "\n" +
|
" -maxreceivebuffer=<n> " + _("Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)") + "\n" +
|
||||||
|
|||||||
@@ -302,8 +302,8 @@ void ThreadIRCSeed2(void* parg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (fTestNet) {
|
if (fTestNet) {
|
||||||
Send(hSocket, "JOIN #novacoinTEST\r");
|
Send(hSocket, "JOIN #novacoinTEST2\r");
|
||||||
Send(hSocket, "WHO #novacoinTEST\r");
|
Send(hSocket, "WHO #novacoinTEST2\r");
|
||||||
} else {
|
} else {
|
||||||
// randomly join #novacoin00-#novacoin05
|
// randomly join #novacoin00-#novacoin05
|
||||||
// int channel_number = GetRandInt(5);
|
// int channel_number = GetRandInt(5);
|
||||||
|
|||||||
@@ -12,16 +12,14 @@ using namespace std;
|
|||||||
extern int nStakeMaxAge;
|
extern int nStakeMaxAge;
|
||||||
extern int nStakeTargetSpacing;
|
extern int nStakeTargetSpacing;
|
||||||
|
|
||||||
// Modifier interval: time to elapse before new modifier is computed
|
|
||||||
// Set to 6-hour for production network and 20-minute for test network
|
|
||||||
unsigned int nModifierInterval = MODIFIER_INTERVAL;
|
|
||||||
|
|
||||||
// Hard checkpoints of stake modifiers to ensure they are deterministic
|
// Hard checkpoints of stake modifiers to ensure they are deterministic
|
||||||
static std::map<int, unsigned int> mapStakeModifierCheckpoints =
|
static std::map<int, unsigned int> mapStakeModifierCheckpoints =
|
||||||
boost::assign::map_list_of
|
boost::assign::map_list_of
|
||||||
( 0, 0x0e00670bu )
|
( 0, 0x0e00670bu )
|
||||||
( 6000, 0xb7cbc5d3u )
|
( 6000, 0xb7cbc5d3u )
|
||||||
( 12661, 0x5d84115du )
|
( 9690, 0x97dcdafau )
|
||||||
|
( 12661, 0x5d84115du )
|
||||||
|
( 19600, 0xdded1b8du )
|
||||||
;
|
;
|
||||||
|
|
||||||
// Get the last stake modifier and its generation time from a given block
|
// Get the last stake modifier and its generation time from a given block
|
||||||
@@ -367,7 +365,7 @@ bool CheckCoinStakeTimestamp(int64 nTimeBlock, int64 nTimeTx)
|
|||||||
// Get stake modifier checksum
|
// Get stake modifier checksum
|
||||||
unsigned int GetStakeModifierChecksum(const CBlockIndex* pindex)
|
unsigned int GetStakeModifierChecksum(const CBlockIndex* pindex)
|
||||||
{
|
{
|
||||||
assert (pindex->pprev || pindex->GetBlockHash() == hashGenesisBlock);
|
assert (pindex->pprev || pindex->GetBlockHash() == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet));
|
||||||
// Hash previous checksum with flags, hashProofOfStake and nStakeModifier
|
// Hash previous checksum with flags, hashProofOfStake and nStakeModifier
|
||||||
CDataStream ss(SER_GETHASH, 0);
|
CDataStream ss(SER_GETHASH, 0);
|
||||||
if (pindex->pprev)
|
if (pindex->pprev)
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
// MODIFIER_INTERVAL: time to elapse before new modifier is computed
|
// MODIFIER_INTERVAL: time to elapse before new modifier is computed
|
||||||
static const unsigned int MODIFIER_INTERVAL = 6 * 60 * 60;
|
|
||||||
extern unsigned int nModifierInterval;
|
extern unsigned int nModifierInterval;
|
||||||
|
|
||||||
// MODIFIER_INTERVAL_RATIO:
|
// MODIFIER_INTERVAL_RATIO:
|
||||||
|
|||||||
130
src/main.cpp
130
src/main.cpp
@@ -32,14 +32,19 @@ unsigned int nTransactionsUpdated = 0;
|
|||||||
|
|
||||||
map<uint256, CBlockIndex*> mapBlockIndex;
|
map<uint256, CBlockIndex*> mapBlockIndex;
|
||||||
set<pair<COutPoint, unsigned int> > setStakeSeen;
|
set<pair<COutPoint, unsigned int> > setStakeSeen;
|
||||||
uint256 hashGenesisBlock = hashGenesisBlockOfficial;
|
|
||||||
static CBigNum bnProofOfWorkLimit(~uint256(0) >> 20);
|
static CBigNum bnProofOfWorkLimit(~uint256(0) >> 20);
|
||||||
static CBigNum bnProofOfStakeLimit(~uint256(0) >> 24);
|
static CBigNum bnProofOfStakeLimit(~uint256(0) >> 24);
|
||||||
static CBigNum bnProofOfStakeHardLimit(~uint256(0) >> 30);
|
static CBigNum bnProofOfStakeHardLimit(~uint256(0) >> 30); // disabled temporarily, will be used in the future to fix minimum PoS difficulty at 0.25
|
||||||
static CBigNum bnInitialHashTarget(~uint256(0) >> 20);
|
|
||||||
|
static CBigNum bnProofOfWorkLimitTestNet(~uint256(0) >> 16);
|
||||||
|
static CBigNum bnProofOfStakeLimitTestNet(~uint256(0) >> 20);
|
||||||
|
|
||||||
unsigned int nStakeMinAge = 60 * 60 * 24 * 30; // minimum age for coin age
|
unsigned int nStakeMinAge = 60 * 60 * 24 * 30; // minimum age for coin age
|
||||||
unsigned int nStakeMaxAge = 60 * 60 * 24 * 90; // stake age of full weight
|
unsigned int nStakeMaxAge = 60 * 60 * 24 * 90; // stake age of full weight
|
||||||
unsigned int nStakeTargetSpacing = 10 * 60; // 10-minute block spacing
|
unsigned int nStakeTargetSpacing = 10 * 60; // 10-minute block spacing
|
||||||
|
unsigned int nModifierInterval = 6 * 60 * 60; // time to elapse before new modifier is computed
|
||||||
|
|
||||||
int nCoinbaseMaturity = 500;
|
int nCoinbaseMaturity = 500;
|
||||||
CBlockIndex* pindexGenesisBlock = NULL;
|
CBlockIndex* pindexGenesisBlock = NULL;
|
||||||
int nBestHeight = -1;
|
int nBestHeight = -1;
|
||||||
@@ -470,9 +475,11 @@ bool CTransaction::CheckTransaction() const
|
|||||||
const CTxOut& txout = vout[i];
|
const CTxOut& txout = vout[i];
|
||||||
if (txout.IsEmpty() && !IsCoinBase() && !IsCoinStake())
|
if (txout.IsEmpty() && !IsCoinBase() && !IsCoinStake())
|
||||||
return DoS(100, error("CTransaction::CheckTransaction() : txout empty for user transaction"));
|
return DoS(100, error("CTransaction::CheckTransaction() : txout empty for user transaction"));
|
||||||
|
|
||||||
// ppcoin: enforce minimum output amount
|
// ppcoin: enforce minimum output amount
|
||||||
if ((!txout.IsEmpty()) && txout.nValue < MIN_TXOUT_AMOUNT)
|
if ((!txout.IsEmpty()) && txout.nValue < MIN_TXOUT_AMOUNT)
|
||||||
return DoS(100, error("CTransaction::CheckTransaction() : txout.nValue below minimum"));
|
return DoS(100, error("CTransaction::CheckTransaction() : txout.nValue below minimum"));
|
||||||
|
|
||||||
if (txout.nValue > MAX_MONEY)
|
if (txout.nValue > MAX_MONEY)
|
||||||
return DoS(100, error("CTransaction::CheckTransaction() : txout.nValue too high"));
|
return DoS(100, error("CTransaction::CheckTransaction() : txout.nValue too high"));
|
||||||
nValueOut += txout.nValue;
|
nValueOut += txout.nValue;
|
||||||
@@ -514,23 +521,6 @@ int64 CTransaction::GetMinFee(unsigned int nBlockSize, bool fAllowFree,
|
|||||||
unsigned int nNewBlockSize = nBlockSize + nBytes;
|
unsigned int nNewBlockSize = nBlockSize + nBytes;
|
||||||
int64 nMinFee = (1 + (int64)nBytes / 1000) * nBaseFee;
|
int64 nMinFee = (1 + (int64)nBytes / 1000) * nBaseFee;
|
||||||
|
|
||||||
if (fAllowFree)
|
|
||||||
{
|
|
||||||
if (nBlockSize == 1)
|
|
||||||
{
|
|
||||||
// Transactions under 10K are free
|
|
||||||
// (about 4500 BTC if made of 50 BTC inputs)
|
|
||||||
if (nBytes < 10000)
|
|
||||||
nMinFee = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Free transaction area
|
|
||||||
if (nNewBlockSize < 27000)
|
|
||||||
nMinFee = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// To limit dust spam, require MIN_TX_FEE/MIN_RELAY_TX_FEE if any output is less than 0.01
|
// To limit dust spam, require MIN_TX_FEE/MIN_RELAY_TX_FEE if any output is less than 0.01
|
||||||
if (nMinFee < nBaseFee)
|
if (nMinFee < nBaseFee)
|
||||||
{
|
{
|
||||||
@@ -946,6 +936,7 @@ uint256 WantedByOrphan(const CBlock* pblockOrphan)
|
|||||||
return pblockOrphan->hashPrevBlock;
|
return pblockOrphan->hashPrevBlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// miner's coin base reward based on nBits
|
||||||
int64 GetProofOfWorkReward(unsigned int nBits)
|
int64 GetProofOfWorkReward(unsigned int nBits)
|
||||||
{
|
{
|
||||||
CBigNum bnSubsidyLimit = MAX_MINT_PROOF_OF_WORK;
|
CBigNum bnSubsidyLimit = MAX_MINT_PROOF_OF_WORK;
|
||||||
@@ -954,7 +945,7 @@ int64 GetProofOfWorkReward(unsigned int nBits)
|
|||||||
CBigNum bnTargetLimit = bnProofOfWorkLimit;
|
CBigNum bnTargetLimit = bnProofOfWorkLimit;
|
||||||
bnTargetLimit.SetCompact(bnTargetLimit.GetCompact());
|
bnTargetLimit.SetCompact(bnTargetLimit.GetCompact());
|
||||||
|
|
||||||
// ppcoin: subsidy is cut in half every 64x multiply of difficulty
|
// NovaCoin: subsidy is cut in half every 64x multiply of PoW difficulty
|
||||||
// A reasonably continuous curve is used to avoid shock to market
|
// A reasonably continuous curve is used to avoid shock to market
|
||||||
// (nSubsidyLimit / nSubsidy) ** 6 == bnProofOfWorkLimit / bnTarget
|
// (nSubsidyLimit / nSubsidy) ** 6 == bnProofOfWorkLimit / bnTarget
|
||||||
//
|
//
|
||||||
@@ -982,13 +973,54 @@ int64 GetProofOfWorkReward(unsigned int nBits)
|
|||||||
return min(nSubsidy, MAX_MINT_PROOF_OF_WORK);
|
return min(nSubsidy, MAX_MINT_PROOF_OF_WORK);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ppcoin: miner's coin stake is rewarded based on coin age spent (coin-days)
|
// miner's coin stake reward based on nBits and coin age spent (coin-days)
|
||||||
int64 GetProofOfStakeReward(int64 nCoinAge)
|
int64 GetProofOfStakeReward(int64 nCoinAge, unsigned int nBits, unsigned int nTime)
|
||||||
{
|
{
|
||||||
static int64 nRewardCoinYear = 5 * CENT; // creation amount per coin-year
|
int64 nRewardCoinYear;
|
||||||
|
|
||||||
|
if(fTestNet || nTime > PROTOCOL_SWITCH_TIME)
|
||||||
|
{
|
||||||
|
// Stage 2 of emission process is PoS-based. It will be active on mainNet since 20 Jun 2013.
|
||||||
|
|
||||||
|
CBigNum bnRewardCoinYearLimit = MAX_MINT_PROOF_OF_STAKE; // Base stake mint rate, 100% year interest
|
||||||
|
CBigNum bnTarget;
|
||||||
|
bnTarget.SetCompact(nBits);
|
||||||
|
CBigNum bnTargetLimit = bnProofOfStakeLimit;
|
||||||
|
bnTargetLimit.SetCompact(bnTargetLimit.GetCompact());
|
||||||
|
|
||||||
|
// NovaCoin: reward for coin-year is cut in half every 64x multiply of PoS difficulty
|
||||||
|
// A reasonably continuous curve is used to avoid shock to market
|
||||||
|
// (nRewardCoinYearLimit / nRewardCoinYear) ** 6 == bnProofOfStakeLimit / bnTarget
|
||||||
|
//
|
||||||
|
// Human readable form:
|
||||||
|
//
|
||||||
|
// nRewardCoinYear = 1 / (posdiff ^ 1/6)
|
||||||
|
|
||||||
|
CBigNum bnLowerBound = 1 * CENT; // Lower interest bound is 1% per year
|
||||||
|
CBigNum bnUpperBound = bnRewardCoinYearLimit;
|
||||||
|
while (bnLowerBound + CENT <= bnUpperBound)
|
||||||
|
{
|
||||||
|
CBigNum bnMidValue = (bnLowerBound + bnUpperBound) / 2;
|
||||||
|
if (fDebug && GetBoolArg("-printcreation"))
|
||||||
|
printf("GetProofOfStakeReward() : lower=%"PRI64d" upper=%"PRI64d" mid=%"PRI64d"\n", bnLowerBound.getuint64(), bnUpperBound.getuint64(), bnMidValue.getuint64());
|
||||||
|
if (bnMidValue * bnMidValue * bnMidValue * bnMidValue * bnMidValue * bnMidValue * bnTargetLimit > bnRewardCoinYearLimit * bnRewardCoinYearLimit * bnRewardCoinYearLimit * bnRewardCoinYearLimit * bnRewardCoinYearLimit * bnRewardCoinYearLimit * bnTarget)
|
||||||
|
bnUpperBound = bnMidValue;
|
||||||
|
else
|
||||||
|
bnLowerBound = bnMidValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
nRewardCoinYear = bnUpperBound.getuint64();
|
||||||
|
nRewardCoinYear = min((nRewardCoinYear / CENT) * CENT, MAX_MINT_PROOF_OF_STAKE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Old creation amount per coin-year, 5% fixed stake mint rate
|
||||||
|
nRewardCoinYear = 5 * CENT;
|
||||||
|
}
|
||||||
|
|
||||||
int64 nSubsidy = nCoinAge * 33 / (365 * 33 + 8) * nRewardCoinYear;
|
int64 nSubsidy = nCoinAge * 33 / (365 * 33 + 8) * nRewardCoinYear;
|
||||||
if (fDebug && GetBoolArg("-printcreation"))
|
if (fDebug && GetBoolArg("-printcreation"))
|
||||||
printf("GetProofOfStakeReward(): create=%s nCoinAge=%"PRI64d"\n", FormatMoney(nSubsidy).c_str(), nCoinAge);
|
printf("GetProofOfStakeReward(): create=%s nCoinAge=%"PRI64d" nBits=%d\n", FormatMoney(nSubsidy).c_str(), nCoinAge, nBits);
|
||||||
return nSubsidy;
|
return nSubsidy;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1033,10 +1065,10 @@ unsigned int static GetNextTargetRequired(const CBlockIndex* pindexLast, bool fP
|
|||||||
{
|
{
|
||||||
// Proof-of-Stake blocks has own target limit since nVersion=3 supermajority on mainNet and always on testNet
|
// Proof-of-Stake blocks has own target limit since nVersion=3 supermajority on mainNet and always on testNet
|
||||||
if(fTestNet)
|
if(fTestNet)
|
||||||
bnTargetLimit = bnProofOfStakeHardLimit;
|
bnTargetLimit = bnProofOfStakeLimit;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(fTestNet || (pindexLast->nHeight + 1 > 15000))
|
if(pindexLast->nHeight + 1 > 15000)
|
||||||
bnTargetLimit = bnProofOfStakeLimit;
|
bnTargetLimit = bnProofOfStakeLimit;
|
||||||
else if(pindexLast->nHeight + 1 > 14060)
|
else if(pindexLast->nHeight + 1 > 14060)
|
||||||
bnTargetLimit = bnProofOfStakeHardLimit;
|
bnTargetLimit = bnProofOfStakeHardLimit;
|
||||||
@@ -1048,10 +1080,10 @@ unsigned int static GetNextTargetRequired(const CBlockIndex* pindexLast, bool fP
|
|||||||
|
|
||||||
const CBlockIndex* pindexPrev = GetLastBlockIndex(pindexLast, fProofOfStake);
|
const CBlockIndex* pindexPrev = GetLastBlockIndex(pindexLast, fProofOfStake);
|
||||||
if (pindexPrev->pprev == NULL)
|
if (pindexPrev->pprev == NULL)
|
||||||
return bnInitialHashTarget.GetCompact(); // first block
|
return bnTargetLimit.GetCompact(); // first block
|
||||||
const CBlockIndex* pindexPrevPrev = GetLastBlockIndex(pindexPrev->pprev, fProofOfStake);
|
const CBlockIndex* pindexPrevPrev = GetLastBlockIndex(pindexPrev->pprev, fProofOfStake);
|
||||||
if (pindexPrevPrev->pprev == NULL)
|
if (pindexPrevPrev->pprev == NULL)
|
||||||
return bnInitialHashTarget.GetCompact(); // second block
|
return bnTargetLimit.GetCompact(); // second block
|
||||||
|
|
||||||
int64 nActualSpacing = pindexPrev->GetBlockTime() - pindexPrevPrev->GetBlockTime();
|
int64 nActualSpacing = pindexPrev->GetBlockTime() - pindexPrevPrev->GetBlockTime();
|
||||||
|
|
||||||
@@ -1381,7 +1413,7 @@ bool CTransaction::ConnectInputs(CTxDB& txdb, MapPrevTx inputs,
|
|||||||
if (!GetCoinAge(txdb, nCoinAge))
|
if (!GetCoinAge(txdb, nCoinAge))
|
||||||
return error("ConnectInputs() : %s unable to get coin age for coinstake", GetHash().ToString().substr(0,10).c_str());
|
return error("ConnectInputs() : %s unable to get coin age for coinstake", GetHash().ToString().substr(0,10).c_str());
|
||||||
int64 nStakeReward = GetValueOut() - nValueIn;
|
int64 nStakeReward = GetValueOut() - nValueIn;
|
||||||
if (nStakeReward > GetProofOfStakeReward(nCoinAge) - GetMinFee() + MIN_TX_FEE)
|
if (nStakeReward > GetProofOfStakeReward(nCoinAge, pindexBlock->nBits, nTime) - GetMinFee() + MIN_TX_FEE)
|
||||||
return DoS(100, error("ConnectInputs() : %s stake reward exceeded", GetHash().ToString().substr(0,10).c_str()));
|
return DoS(100, error("ConnectInputs() : %s stake reward exceeded", GetHash().ToString().substr(0,10).c_str()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1736,7 +1768,7 @@ bool CBlock::SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew)
|
|||||||
if (!txdb.TxnBegin())
|
if (!txdb.TxnBegin())
|
||||||
return error("SetBestChain() : TxnBegin failed");
|
return error("SetBestChain() : TxnBegin failed");
|
||||||
|
|
||||||
if (pindexGenesisBlock == NULL && hash == hashGenesisBlock)
|
if (pindexGenesisBlock == NULL && hash == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet))
|
||||||
{
|
{
|
||||||
txdb.WriteHashBestChain(hash);
|
txdb.WriteHashBestChain(hash);
|
||||||
if (!txdb.TxnCommit())
|
if (!txdb.TxnCommit())
|
||||||
@@ -2111,7 +2143,16 @@ bool CBlock::AcceptBlock()
|
|||||||
|
|
||||||
// ppcoin: check that the block satisfies synchronized checkpoint
|
// ppcoin: check that the block satisfies synchronized checkpoint
|
||||||
if (!Checkpoints::CheckSync(hash, pindexPrev))
|
if (!Checkpoints::CheckSync(hash, pindexPrev))
|
||||||
return error("AcceptBlock() : rejected by synchronized checkpoint");
|
{
|
||||||
|
if(!GetBoolArg("-nosynccheckpoints", false))
|
||||||
|
{
|
||||||
|
return error("AcceptBlock() : rejected by synchronized checkpoint");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
strMiscWarning = _("WARNING: syncronized checkpoint violation detected, but skipped!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Reject block.nVersion < 3 blocks since 95% threshold on mainNet and always on testNet:
|
// Reject block.nVersion < 3 blocks since 95% threshold on mainNet and always on testNet:
|
||||||
if (nVersion < 3 && ((!fTestNet && nHeight > 14060) || (fTestNet && nHeight > 0)))
|
if (nVersion < 3 && ((!fTestNet && nHeight > 14060) || (fTestNet && nHeight > 0)))
|
||||||
@@ -2337,7 +2378,7 @@ bool CBlock::SignBlock(const CKeyStore& keystore)
|
|||||||
// ppcoin: check block signature
|
// ppcoin: check block signature
|
||||||
bool CBlock::CheckBlockSignature() const
|
bool CBlock::CheckBlockSignature() const
|
||||||
{
|
{
|
||||||
if (GetHash() == hashGenesisBlock)
|
if (GetHash() == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet))
|
||||||
return vchBlockSig.empty();
|
return vchBlockSig.empty();
|
||||||
|
|
||||||
vector<valtype> vSolutions;
|
vector<valtype> vSolutions;
|
||||||
@@ -2462,10 +2503,12 @@ bool LoadBlockIndex(bool fAllowNew)
|
|||||||
pchMessageStart[2] = 0xc0;
|
pchMessageStart[2] = 0xc0;
|
||||||
pchMessageStart[3] = 0xef;
|
pchMessageStart[3] = 0xef;
|
||||||
|
|
||||||
|
bnProofOfStakeLimit = bnProofOfStakeLimitTestNet; // 0x00000fff PoS base target is fixed in testnet
|
||||||
hashGenesisBlock = hashGenesisBlockTestNet;
|
bnProofOfWorkLimit = bnProofOfWorkLimitTestNet; // 0x0000ffff PoW base target is fixed in testnet
|
||||||
nStakeMinAge = 60 * 60 * 24; // test net min age is 1 day
|
nStakeMinAge = 2 * 60 * 60; // test net min age is 2 hours
|
||||||
nCoinbaseMaturity = 60;
|
nModifierInterval = 20 * 60; // test modifier interval is 20 minutes
|
||||||
|
nCoinbaseMaturity = 10; // test maturity is 10 blocks
|
||||||
|
nStakeTargetSpacing = 3 * 60; // test block spacing is 3 minutes
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -2506,12 +2549,12 @@ bool LoadBlockIndex(bool fAllowNew)
|
|||||||
block.nVersion = 1;
|
block.nVersion = 1;
|
||||||
block.nTime = 1360105017;
|
block.nTime = 1360105017;
|
||||||
block.nBits = bnProofOfWorkLimit.GetCompact();
|
block.nBits = bnProofOfWorkLimit.GetCompact();
|
||||||
block.nNonce = 1575379;
|
block.nNonce = !fTestNet ? 1575379 : 46534;
|
||||||
|
|
||||||
//// debug print
|
//// debug print
|
||||||
assert(block.hashMerkleRoot == uint256("0x4cb33b3b6a861dcbc685d3e614a9cafb945738d6833f182855679f2fad02057b"));
|
assert(block.hashMerkleRoot == uint256("0x4cb33b3b6a861dcbc685d3e614a9cafb945738d6833f182855679f2fad02057b"));
|
||||||
block.print();
|
block.print();
|
||||||
assert(block.GetHash() == hashGenesisBlock);
|
assert(block.GetHash() == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet));
|
||||||
assert(block.CheckBlock());
|
assert(block.CheckBlock());
|
||||||
|
|
||||||
// Start new block file
|
// Start new block file
|
||||||
@@ -2523,7 +2566,7 @@ bool LoadBlockIndex(bool fAllowNew)
|
|||||||
return error("LoadBlockIndex() : genesis block not accepted");
|
return error("LoadBlockIndex() : genesis block not accepted");
|
||||||
|
|
||||||
// ppcoin: initialize synchronized checkpoint
|
// ppcoin: initialize synchronized checkpoint
|
||||||
if (!Checkpoints::WriteSyncCheckpoint(hashGenesisBlock))
|
if (!Checkpoints::WriteSyncCheckpoint((!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet)))
|
||||||
return error("LoadBlockIndex() : failed to init sync checkpoint");
|
return error("LoadBlockIndex() : failed to init sync checkpoint");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2711,14 +2754,13 @@ string GetWarnings(string strFor)
|
|||||||
|
|
||||||
if (GetBoolArg("-testsafemode"))
|
if (GetBoolArg("-testsafemode"))
|
||||||
strRPC = "test";
|
strRPC = "test";
|
||||||
/*
|
|
||||||
// ppcoin: wallet lock warning for minting
|
// ppcoin: wallet lock warning for minting
|
||||||
if (strMintWarning != "")
|
if (strMintWarning != "")
|
||||||
{
|
{
|
||||||
nPriority = 0;
|
nPriority = 0;
|
||||||
strStatusBar = strMintWarning;
|
strStatusBar = strMintWarning;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
// Misc warnings like out of disk space and clock is wrong
|
// Misc warnings like out of disk space and clock is wrong
|
||||||
if (strMiscWarning != "")
|
if (strMiscWarning != "")
|
||||||
@@ -3879,8 +3921,6 @@ CBlock* CreateNewBlock(CWallet* pwallet, bool fProofOfStake)
|
|||||||
// Add our coinbase tx as first transaction
|
// Add our coinbase tx as first transaction
|
||||||
pblock->vtx.push_back(txNew);
|
pblock->vtx.push_back(txNew);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Largest block you're willing to create:
|
// Largest block you're willing to create:
|
||||||
unsigned int nBlockMaxSize = GetArg("-blockmaxsize", MAX_BLOCK_SIZE_GEN/2);
|
unsigned int nBlockMaxSize = GetArg("-blockmaxsize", MAX_BLOCK_SIZE_GEN/2);
|
||||||
// Limit to betweeen 1K and MAX_BLOCK_SIZE-1K for sanity:
|
// Limit to betweeen 1K and MAX_BLOCK_SIZE-1K for sanity:
|
||||||
@@ -3909,7 +3949,7 @@ CBlock* CreateNewBlock(CWallet* pwallet, bool fProofOfStake)
|
|||||||
static int64 nLastCoinStakeSearchTime = GetAdjustedTime(); // only initialized at startup
|
static int64 nLastCoinStakeSearchTime = GetAdjustedTime(); // only initialized at startup
|
||||||
CBlockIndex* pindexPrev = pindexBest;
|
CBlockIndex* pindexPrev = pindexBest;
|
||||||
|
|
||||||
if (fProofOfStake) // attemp to find a coinstake
|
if (fProofOfStake) // attempt to find a coinstake
|
||||||
{
|
{
|
||||||
pblock->nBits = GetNextTargetRequired(pindexPrev, true);
|
pblock->nBits = GetNextTargetRequired(pindexPrev, true);
|
||||||
CTransaction txCoinStake;
|
CTransaction txCoinStake;
|
||||||
|
|||||||
36
src/main.h
36
src/main.h
@@ -34,7 +34,10 @@ static const int64 MIN_TX_FEE = CENT;
|
|||||||
static const int64 MIN_RELAY_TX_FEE = CENT;
|
static const int64 MIN_RELAY_TX_FEE = CENT;
|
||||||
static const int64 MAX_MONEY = 2000000000 * COIN;
|
static const int64 MAX_MONEY = 2000000000 * COIN;
|
||||||
static const int64 MAX_MINT_PROOF_OF_WORK = 100 * COIN;
|
static const int64 MAX_MINT_PROOF_OF_WORK = 100 * COIN;
|
||||||
|
static const int64 MAX_MINT_PROOF_OF_STAKE = 1 * COIN;
|
||||||
static const int64 MIN_TXOUT_AMOUNT = MIN_TX_FEE;
|
static const int64 MIN_TXOUT_AMOUNT = MIN_TX_FEE;
|
||||||
|
static const unsigned int PROTOCOL_SWITCH_TIME = 1371686400; // 20 Jun 2013 00:00:00
|
||||||
|
|
||||||
inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
|
inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
|
||||||
// Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp.
|
// Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp.
|
||||||
static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov 5 00:53:20 1985 UTC
|
static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov 5 00:53:20 1985 UTC
|
||||||
@@ -45,22 +48,17 @@ static const int fHaveUPnP = true;
|
|||||||
static const int fHaveUPnP = false;
|
static const int fHaveUPnP = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const uint256 hashGenesisBlockOfficial("0x00000a060336cbb72fe969666d337b87198b1add2abaa59cca226820b32933a4");
|
static const uint256 hashGenesisBlock("0x00000a060336cbb72fe969666d337b87198b1add2abaa59cca226820b32933a4");
|
||||||
static const uint256 hashGenesisBlockTestNet("0x00000a060336cbb72fe969666d337b87198b1add2abaa59cca226820b32933a4");
|
static const uint256 hashGenesisBlockTestNet("0x000c763e402f2436da9ed36c7286f62c3f6e5dbafce9ff289bd43d7459327eb");
|
||||||
|
|
||||||
static const int64 nMaxClockDrift = 2 * 60 * 60; // two hours
|
static const int64 nMaxClockDrift = 2 * 60 * 60; // two hours
|
||||||
|
|
||||||
extern CScript COINBASE_FLAGS;
|
extern CScript COINBASE_FLAGS;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
extern CCriticalSection cs_main;
|
extern CCriticalSection cs_main;
|
||||||
extern std::map<uint256, CBlockIndex*> mapBlockIndex;
|
extern std::map<uint256, CBlockIndex*> mapBlockIndex;
|
||||||
extern std::set<std::pair<COutPoint, unsigned int> > setStakeSeen;
|
extern std::set<std::pair<COutPoint, unsigned int> > setStakeSeen;
|
||||||
extern uint256 hashGenesisBlock;
|
|
||||||
extern CBlockIndex* pindexGenesisBlock;
|
extern CBlockIndex* pindexGenesisBlock;
|
||||||
extern unsigned int nStakeMinAge;
|
extern unsigned int nStakeMinAge;
|
||||||
extern int nCoinbaseMaturity;
|
extern int nCoinbaseMaturity;
|
||||||
@@ -113,7 +111,7 @@ void FormatHashBuffers(CBlock* pblock, char* pmidstate, char* pdata, char* phash
|
|||||||
bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey);
|
bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey);
|
||||||
bool CheckProofOfWork(uint256 hash, unsigned int nBits);
|
bool CheckProofOfWork(uint256 hash, unsigned int nBits);
|
||||||
int64 GetProofOfWorkReward(unsigned int nBits);
|
int64 GetProofOfWorkReward(unsigned int nBits);
|
||||||
int64 GetProofOfStakeReward(int64 nCoinAge);
|
int64 GetProofOfStakeReward(int64 nCoinAge, unsigned int nBits, unsigned int nTime);
|
||||||
unsigned int ComputeMinWork(unsigned int nBase, int64 nTime);
|
unsigned int ComputeMinWork(unsigned int nBase, int64 nTime);
|
||||||
int GetNumBlocksOfPeers();
|
int GetNumBlocksOfPeers();
|
||||||
bool IsInitialBlockDownload();
|
bool IsInitialBlockDownload();
|
||||||
@@ -834,7 +832,7 @@ class CBlock
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// header
|
// header
|
||||||
static const int CURRENT_VERSION=3;
|
static const int CURRENT_VERSION=4;
|
||||||
int nVersion;
|
int nVersion;
|
||||||
uint256 hashPrevBlock;
|
uint256 hashPrevBlock;
|
||||||
uint256 hashMerkleRoot;
|
uint256 hashMerkleRoot;
|
||||||
@@ -925,7 +923,7 @@ public:
|
|||||||
unsigned int GetStakeEntropyBit(unsigned int nHeight) const
|
unsigned int GetStakeEntropyBit(unsigned int nHeight) const
|
||||||
{
|
{
|
||||||
// Protocol switch to support p2pool at novacoin block #9689
|
// Protocol switch to support p2pool at novacoin block #9689
|
||||||
if (nHeight >= 9689)
|
if (nHeight >= 9689 || fTestNet)
|
||||||
{
|
{
|
||||||
// Take last bit of block hash as entropy bit
|
// Take last bit of block hash as entropy bit
|
||||||
unsigned int nEntropyBit = ((GetHash().Get64()) & 1llu);
|
unsigned int nEntropyBit = ((GetHash().Get64()) & 1llu);
|
||||||
@@ -1076,10 +1074,10 @@ public:
|
|||||||
void print() const
|
void print() const
|
||||||
{
|
{
|
||||||
printf("CBlock(hash=%s, ver=%d, hashPrevBlock=%s, hashMerkleRoot=%s, nTime=%u, nBits=%08x, nNonce=%u, vtx=%"PRIszu", vchBlockSig=%s)\n",
|
printf("CBlock(hash=%s, ver=%d, hashPrevBlock=%s, hashMerkleRoot=%s, nTime=%u, nBits=%08x, nNonce=%u, vtx=%"PRIszu", vchBlockSig=%s)\n",
|
||||||
GetHash().ToString().substr(0,20).c_str(),
|
GetHash().ToString().c_str(),
|
||||||
nVersion,
|
nVersion,
|
||||||
hashPrevBlock.ToString().substr(0,20).c_str(),
|
hashPrevBlock.ToString().c_str(),
|
||||||
hashMerkleRoot.ToString().substr(0,10).c_str(),
|
hashMerkleRoot.ToString().c_str(),
|
||||||
nTime, nBits, nNonce,
|
nTime, nBits, nNonce,
|
||||||
vtx.size(),
|
vtx.size(),
|
||||||
HexStr(vchBlockSig.begin(), vchBlockSig.end()).c_str());
|
HexStr(vchBlockSig.begin(), vchBlockSig.end()).c_str());
|
||||||
@@ -1345,8 +1343,8 @@ public:
|
|||||||
nStakeModifier, nStakeModifierChecksum,
|
nStakeModifier, nStakeModifierChecksum,
|
||||||
hashProofOfStake.ToString().c_str(),
|
hashProofOfStake.ToString().c_str(),
|
||||||
prevoutStake.ToString().c_str(), nStakeTime,
|
prevoutStake.ToString().c_str(), nStakeTime,
|
||||||
hashMerkleRoot.ToString().substr(0,10).c_str(),
|
hashMerkleRoot.ToString().c_str(),
|
||||||
GetBlockHash().ToString().substr(0,20).c_str());
|
GetBlockHash().ToString().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void print() const
|
void print() const
|
||||||
@@ -1430,8 +1428,8 @@ public:
|
|||||||
str += CBlockIndex::ToString();
|
str += CBlockIndex::ToString();
|
||||||
str += strprintf("\n hashBlock=%s, hashPrev=%s, hashNext=%s)",
|
str += strprintf("\n hashBlock=%s, hashPrev=%s, hashNext=%s)",
|
||||||
GetBlockHash().ToString().c_str(),
|
GetBlockHash().ToString().c_str(),
|
||||||
hashPrev.ToString().substr(0,20).c_str(),
|
hashPrev.ToString().c_str(),
|
||||||
hashNext.ToString().substr(0,20).c_str());
|
hashNext.ToString().c_str());
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1510,7 +1508,7 @@ public:
|
|||||||
if (vHave.size() > 10)
|
if (vHave.size() > 10)
|
||||||
nStep *= 2;
|
nStep *= 2;
|
||||||
}
|
}
|
||||||
vHave.push_back(hashGenesisBlock);
|
vHave.push_back((!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet));
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetDistanceBack()
|
int GetDistanceBack()
|
||||||
@@ -1563,7 +1561,7 @@ public:
|
|||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return hashGenesisBlock;
|
return (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet);
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetHeight()
|
int GetHeight()
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ LIBPATHS= \
|
|||||||
-L"C:\openssl-1.0.1c-mgw"
|
-L"C:\openssl-1.0.1c-mgw"
|
||||||
|
|
||||||
LIBS= \
|
LIBS= \
|
||||||
-l boost_system-mgw45-mt-s-1_50 \
|
-l boost_system-mgw44-mt-1_53 \
|
||||||
-l boost_filesystem-mgw45-mt-s-1_50 \
|
-l boost_filesystem-mgw44-mt-1_53 \
|
||||||
-l boost_program_options-mgw45-mt-s-1_50 \
|
-l boost_program_options-mgw44-mt-1_53 \
|
||||||
-l boost_thread-mgw45-mt-s-1_50 \
|
-l boost_thread-mgw44-mt-1_53 \
|
||||||
-l boost_chrono-mgw45-mt-s-1_50 \
|
-l boost_chrono-mgw44-mt-1_53 \
|
||||||
-l db_cxx \
|
-l db_cxx \
|
||||||
-l ssl \
|
-l ssl \
|
||||||
-l crypto
|
-l crypto
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace boost;
|
using namespace boost;
|
||||||
|
|
||||||
static const int MAX_OUTBOUND_CONNECTIONS = 8;
|
static const int MAX_OUTBOUND_CONNECTIONS = 16;
|
||||||
|
|
||||||
void ThreadMessageHandler2(void* parg);
|
void ThreadMessageHandler2(void* parg);
|
||||||
void ThreadSocketHandler2(void* parg);
|
void ThreadSocketHandler2(void* parg);
|
||||||
|
|||||||
@@ -1,169 +1,169 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>SendCoinsEntry</class>
|
<class>SendCoinsEntry</class>
|
||||||
<widget class="QFrame" name="SendCoinsEntry">
|
<widget class="QFrame" name="SendCoinsEntry">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>729</width>
|
<width>729</width>
|
||||||
<height>136</height>
|
<height>136</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::StyledPanel</enum>
|
<enum>QFrame::StyledPanel</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Sunken</enum>
|
<enum>QFrame::Sunken</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>12</number>
|
<number>12</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="5" column="0">
|
<item row="5" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>A&mount:</string>
|
<string>A&mount:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy">
|
<property name="buddy">
|
||||||
<cstring>payAmount</cstring>
|
<cstring>payAmount</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Pay &To:</string>
|
<string>Pay &To:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy">
|
<property name="buddy">
|
||||||
<cstring>payTo</cstring>
|
<cstring>payTo</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="1">
|
<item row="5" column="1">
|
||||||
<widget class="BitcoinAmountField" name="payAmount"/>
|
<widget class="BitcoinAmountField" name="payAmount"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="4" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QValidatedLineEdit" name="addAsLabel">
|
<widget class="QValidatedLineEdit" name="addAsLabel">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Enter a label for this address to add it to your address book</string>
|
<string>Enter a label for this address to add it to your address book</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label_4">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Label:</string>
|
<string>&Label:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy">
|
<property name="buddy">
|
||||||
<cstring>addAsLabel</cstring>
|
<cstring>addAsLabel</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<layout class="QHBoxLayout" name="payToLayout">
|
<layout class="QHBoxLayout" name="payToLayout">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QValidatedLineEdit" name="payTo">
|
<widget class="QValidatedLineEdit" name="payTo">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</string>
|
<string>The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5)</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="maxLength">
|
<property name="maxLength">
|
||||||
<number>34</number>
|
<number>34</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="addressBookButton">
|
<widget class="QToolButton" name="addressBookButton">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Choose address from address book</string>
|
<string>Choose address from address book</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../bitcoin.qrc">
|
<iconset resource="../bitcoin.qrc">
|
||||||
<normaloff>:/icons/address-book</normaloff>:/icons/address-book</iconset>
|
<normaloff>:/icons/address-book</normaloff>:/icons/address-book</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string>Alt+A</string>
|
<string>Alt+A</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="pasteButton">
|
<widget class="QToolButton" name="pasteButton">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Paste address from clipboard</string>
|
<string>Paste address from clipboard</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../bitcoin.qrc">
|
<iconset resource="../bitcoin.qrc">
|
||||||
<normaloff>:/icons/editpaste</normaloff>:/icons/editpaste</iconset>
|
<normaloff>:/icons/editpaste</normaloff>:/icons/editpaste</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string>Alt+P</string>
|
<string>Alt+P</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="deleteButton">
|
<widget class="QToolButton" name="deleteButton">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Remove this recipient</string>
|
<string>Remove this recipient</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../bitcoin.qrc">
|
<iconset resource="../bitcoin.qrc">
|
||||||
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
|
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>BitcoinAmountField</class>
|
<class>QValidatedLineEdit</class>
|
||||||
<extends>QLineEdit</extends>
|
<extends>QLineEdit</extends>
|
||||||
<header>bitcoinamountfield.h</header>
|
<header>qvalidatedlineedit.h</header>
|
||||||
<container>1</container>
|
</customwidget>
|
||||||
</customwidget>
|
<customwidget>
|
||||||
<customwidget>
|
<class>BitcoinAmountField</class>
|
||||||
<class>QValidatedLineEdit</class>
|
<extends>QLineEdit</extends>
|
||||||
<extends>QLineEdit</extends>
|
<header>bitcoinamountfield.h</header>
|
||||||
<header>qvalidatedlineedit.h</header>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../bitcoin.qrc"/>
|
<include location="../bitcoin.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
@@ -1,386 +1,386 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>SignVerifyMessageDialog</class>
|
<class>SignVerifyMessageDialog</class>
|
||||||
<widget class="QDialog" name="SignVerifyMessageDialog">
|
<widget class="QDialog" name="SignVerifyMessageDialog">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>700</width>
|
<width>700</width>
|
||||||
<height>380</height>
|
<height>380</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Signatures - Sign / Verify a Message</string>
|
<string>Signatures - Sign / Verify a Message</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="modal">
|
<property name="modal">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tabSignMessage">
|
<widget class="QWidget" name="tabSignMessage">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>&Sign Message</string>
|
<string>&Sign Message</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_SM">
|
<layout class="QVBoxLayout" name="verticalLayout_SM">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="infoLabel_SM">
|
<widget class="QLabel" name="infoLabel_SM">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</string>
|
<string>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="textFormat">
|
<property name="textFormat">
|
||||||
<enum>Qt::PlainText</enum>
|
<enum>Qt::PlainText</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_1_SM">
|
<layout class="QHBoxLayout" name="horizontalLayout_1_SM">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QValidatedLineEdit" name="addressIn_SM">
|
<widget class="QValidatedLineEdit" name="addressIn_SM">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</string>
|
<string>The address to sign the message with (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5)</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="maxLength">
|
<property name="maxLength">
|
||||||
<number>34</number>
|
<number>34</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="addressBookButton_SM">
|
<widget class="QPushButton" name="addressBookButton_SM">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Choose an address from the address book</string>
|
<string>Choose an address from the address book</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../bitcoin.qrc">
|
<iconset resource="../bitcoin.qrc">
|
||||||
<normaloff>:/icons/address-book</normaloff>:/icons/address-book</iconset>
|
<normaloff>:/icons/address-book</normaloff>:/icons/address-book</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string>Alt+A</string>
|
<string>Alt+A</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoDefault">
|
<property name="autoDefault">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pasteButton_SM">
|
<widget class="QPushButton" name="pasteButton_SM">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Paste address from clipboard</string>
|
<string>Paste address from clipboard</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../bitcoin.qrc">
|
<iconset resource="../bitcoin.qrc">
|
||||||
<normaloff>:/icons/editpaste</normaloff>:/icons/editpaste</iconset>
|
<normaloff>:/icons/editpaste</normaloff>:/icons/editpaste</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string>Alt+P</string>
|
<string>Alt+P</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoDefault">
|
<property name="autoDefault">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPlainTextEdit" name="messageIn_SM">
|
<widget class="QPlainTextEdit" name="messageIn_SM">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Enter the message you want to sign here</string>
|
<string>Enter the message you want to sign here</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2_SM">
|
<layout class="QHBoxLayout" name="horizontalLayout_2_SM">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="signatureOut_SM">
|
<widget class="QLineEdit" name="signatureOut_SM">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<italic>true</italic>
|
<italic>true</italic>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="readOnly">
|
<property name="readOnly">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="copySignatureButton_SM">
|
<widget class="QPushButton" name="copySignatureButton_SM">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Copy the current signature to the system clipboard</string>
|
<string>Copy the current signature to the system clipboard</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../bitcoin.qrc">
|
<iconset resource="../bitcoin.qrc">
|
||||||
<normaloff>:/icons/editcopy</normaloff>:/icons/editcopy</iconset>
|
<normaloff>:/icons/editcopy</normaloff>:/icons/editcopy</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoDefault">
|
<property name="autoDefault">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3_SM">
|
<layout class="QHBoxLayout" name="horizontalLayout_3_SM">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="signMessageButton_SM">
|
<widget class="QPushButton" name="signMessageButton_SM">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Sign the message to prove you own this NovaCoin address</string>
|
<string>Sign the message to prove you own this NovaCoin address</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Sign Message</string>
|
<string>&Sign Message</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../bitcoin.qrc">
|
<iconset resource="../bitcoin.qrc">
|
||||||
<normaloff>:/icons/edit</normaloff>:/icons/edit</iconset>
|
<normaloff>:/icons/edit</normaloff>:/icons/edit</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoDefault">
|
<property name="autoDefault">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="clearButton_SM">
|
<widget class="QPushButton" name="clearButton_SM">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Reset all sign message fields</string>
|
<string>Reset all sign message fields</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Clear &All</string>
|
<string>Clear &All</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../bitcoin.qrc">
|
<iconset resource="../bitcoin.qrc">
|
||||||
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
|
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoDefault">
|
<property name="autoDefault">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_1_SM">
|
<spacer name="horizontalSpacer_1_SM">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>40</width>
|
<width>40</width>
|
||||||
<height>48</height>
|
<height>48</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="statusLabel_SM">
|
<widget class="QLabel" name="statusLabel_SM">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<weight>75</weight>
|
<weight>75</weight>
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_2_SM">
|
<spacer name="horizontalSpacer_2_SM">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>40</width>
|
<width>40</width>
|
||||||
<height>48</height>
|
<height>48</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tabVerifyMessage">
|
<widget class="QWidget" name="tabVerifyMessage">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>&Verify Message</string>
|
<string>&Verify Message</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_VM">
|
<layout class="QVBoxLayout" name="verticalLayout_VM">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="infoLabel_VM">
|
<widget class="QLabel" name="infoLabel_VM">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</string>
|
<string>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="textFormat">
|
<property name="textFormat">
|
||||||
<enum>Qt::PlainText</enum>
|
<enum>Qt::PlainText</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_1_VM">
|
<layout class="QHBoxLayout" name="horizontalLayout_1_VM">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QValidatedLineEdit" name="addressIn_VM">
|
<widget class="QValidatedLineEdit" name="addressIn_VM">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</string>
|
<string>The address the message was signed with (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5)</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="maxLength">
|
<property name="maxLength">
|
||||||
<number>34</number>
|
<number>34</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="addressBookButton_VM">
|
<widget class="QPushButton" name="addressBookButton_VM">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Choose an address from the address book</string>
|
<string>Choose an address from the address book</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../bitcoin.qrc">
|
<iconset resource="../bitcoin.qrc">
|
||||||
<normaloff>:/icons/address-book</normaloff>:/icons/address-book</iconset>
|
<normaloff>:/icons/address-book</normaloff>:/icons/address-book</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string>Alt+A</string>
|
<string>Alt+A</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoDefault">
|
<property name="autoDefault">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPlainTextEdit" name="messageIn_VM"/>
|
<widget class="QPlainTextEdit" name="messageIn_VM"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QValidatedLineEdit" name="signatureIn_VM"/>
|
<widget class="QValidatedLineEdit" name="signatureIn_VM"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2_VM">
|
<layout class="QHBoxLayout" name="horizontalLayout_2_VM">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="verifyMessageButton_VM">
|
<widget class="QPushButton" name="verifyMessageButton_VM">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Verify the message to ensure it was signed with the specified NovaCoin address</string>
|
<string>Verify the message to ensure it was signed with the specified NovaCoin address</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Verify Message</string>
|
<string>&Verify Message</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../bitcoin.qrc">
|
<iconset resource="../bitcoin.qrc">
|
||||||
<normaloff>:/icons/transaction_0</normaloff>:/icons/transaction_0</iconset>
|
<normaloff>:/icons/transaction_0</normaloff>:/icons/transaction_0</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoDefault">
|
<property name="autoDefault">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="clearButton_VM">
|
<widget class="QPushButton" name="clearButton_VM">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Reset all verify message fields</string>
|
<string>Reset all verify message fields</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Clear &All</string>
|
<string>Clear &All</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../bitcoin.qrc">
|
<iconset resource="../bitcoin.qrc">
|
||||||
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
|
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoDefault">
|
<property name="autoDefault">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_1_VM">
|
<spacer name="horizontalSpacer_1_VM">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>40</width>
|
<width>40</width>
|
||||||
<height>48</height>
|
<height>48</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="statusLabel_VM">
|
<widget class="QLabel" name="statusLabel_VM">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<weight>75</weight>
|
<weight>75</weight>
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_2_VM">
|
<spacer name="horizontalSpacer_2_VM">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>40</width>
|
<width>40</width>
|
||||||
<height>48</height>
|
<height>48</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>QValidatedLineEdit</class>
|
<class>QValidatedLineEdit</class>
|
||||||
<extends>QLineEdit</extends>
|
<extends>QLineEdit</extends>
|
||||||
<header>qvalidatedlineedit.h</header>
|
<header>qvalidatedlineedit.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../bitcoin.qrc"/>
|
<include location="../bitcoin.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
Binary file not shown.
@@ -215,10 +215,8 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
|
|||||||
|
|
||||||
strHTML += "<b>" + tr("Transaction ID") + ":</b> " + wtx.GetHash().ToString().c_str() + "<br>";
|
strHTML += "<b>" + tr("Transaction ID") + ":</b> " + wtx.GetHash().ToString().c_str() + "<br>";
|
||||||
|
|
||||||
if (wtx.IsCoinBase())
|
if (wtx.IsCoinBase() || wtx.IsCoinStake())
|
||||||
strHTML += "<br>" + tr("Generated coins must mature 520 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to \"not accepted\" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.") + "<br>";
|
strHTML += "<br>" + tr("Generated coins must mature 520 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to \"not accepted\" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.") + "<br>";
|
||||||
if (wtx.IsCoinStake())
|
|
||||||
strHTML += QString("<br>") + tr("Staked coins must wait 520 blocks before they can return to balance and be spent. When you generated this proof-of-stake block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it will change to \"not accepted\" and not be a valid stake. This may occasionally happen if another node generates a proof-of-stake block within a few seconds of yours.") + "<br>";
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Debug view
|
// Debug view
|
||||||
|
|||||||
@@ -31,7 +31,12 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
|||||||
uint256 hash = wtx.GetHash();
|
uint256 hash = wtx.GetHash();
|
||||||
std::map<std::string, std::string> mapValue = wtx.mapValue;
|
std::map<std::string, std::string> mapValue = wtx.mapValue;
|
||||||
|
|
||||||
if (nNet > 0 || wtx.IsCoinBase())
|
if (wtx.IsCoinStake())
|
||||||
|
{
|
||||||
|
// Stake generation
|
||||||
|
parts.append(TransactionRecord(hash, nTime, TransactionRecord::StakeMint, "", -nDebit, wtx.GetValueOut()));
|
||||||
|
}
|
||||||
|
else if (nNet > 0 || wtx.IsCoinBase())
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Credit
|
// Credit
|
||||||
@@ -192,7 +197,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// For generated transactions, determine maturity
|
// For generated transactions, determine maturity
|
||||||
if(type == TransactionRecord::Generated)
|
if(type == TransactionRecord::Generated || type == TransactionRecord::StakeMint)
|
||||||
{
|
{
|
||||||
int64 nCredit = wtx.GetCredit(true);
|
int64 nCredit = wtx.GetCredit(true);
|
||||||
if (nCredit == 0)
|
if (nCredit == 0)
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ public:
|
|||||||
SendToOther,
|
SendToOther,
|
||||||
RecvWithAddress,
|
RecvWithAddress,
|
||||||
RecvFromOther,
|
RecvFromOther,
|
||||||
SendToSelf
|
SendToSelf,
|
||||||
|
StakeMint
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Number of confirmation needed for transaction */
|
/** Number of confirmation needed for transaction */
|
||||||
|
|||||||
@@ -295,7 +295,7 @@ QString TransactionTableModel::formatTxStatus(const TransactionRecord *wtx) cons
|
|||||||
status = tr("Confirmed (%1 confirmations)").arg(wtx->status.depth);
|
status = tr("Confirmed (%1 confirmations)").arg(wtx->status.depth);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(wtx->type == TransactionRecord::Generated)
|
if(wtx->type == TransactionRecord::Generated || wtx->type == TransactionRecord::StakeMint)
|
||||||
{
|
{
|
||||||
switch(wtx->status.maturity)
|
switch(wtx->status.maturity)
|
||||||
{
|
{
|
||||||
@@ -359,6 +359,7 @@ QString TransactionTableModel::formatTxType(const TransactionRecord *wtx) const
|
|||||||
return tr("Sent to");
|
return tr("Sent to");
|
||||||
case TransactionRecord::SendToSelf:
|
case TransactionRecord::SendToSelf:
|
||||||
return tr("Payment to yourself");
|
return tr("Payment to yourself");
|
||||||
|
case TransactionRecord::StakeMint:
|
||||||
case TransactionRecord::Generated:
|
case TransactionRecord::Generated:
|
||||||
return tr("Mined");
|
return tr("Mined");
|
||||||
default:
|
default:
|
||||||
@@ -371,6 +372,7 @@ QVariant TransactionTableModel::txAddressDecoration(const TransactionRecord *wtx
|
|||||||
switch(wtx->type)
|
switch(wtx->type)
|
||||||
{
|
{
|
||||||
case TransactionRecord::Generated:
|
case TransactionRecord::Generated:
|
||||||
|
case TransactionRecord::StakeMint:
|
||||||
return QIcon(":/icons/tx_mined");
|
return QIcon(":/icons/tx_mined");
|
||||||
case TransactionRecord::RecvWithAddress:
|
case TransactionRecord::RecvWithAddress:
|
||||||
case TransactionRecord::RecvFromOther:
|
case TransactionRecord::RecvFromOther:
|
||||||
@@ -438,7 +440,7 @@ QString TransactionTableModel::formatTxAmount(const TransactionRecord *wtx, bool
|
|||||||
|
|
||||||
QVariant TransactionTableModel::txStatusDecoration(const TransactionRecord *wtx) const
|
QVariant TransactionTableModel::txStatusDecoration(const TransactionRecord *wtx) const
|
||||||
{
|
{
|
||||||
if(wtx->type == TransactionRecord::Generated)
|
if(wtx->type == TransactionRecord::Generated || wtx->type == TransactionRecord::StakeMint)
|
||||||
{
|
{
|
||||||
switch(wtx->status.maturity)
|
switch(wtx->status.maturity)
|
||||||
{
|
{
|
||||||
@@ -573,7 +575,7 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
|
|||||||
return QString::fromStdString(rec->getTxID());
|
return QString::fromStdString(rec->getTxID());
|
||||||
case ConfirmedRole:
|
case ConfirmedRole:
|
||||||
// Return True if transaction counts for balance
|
// Return True if transaction counts for balance
|
||||||
return rec->status.confirmed && !(rec->type == TransactionRecord::Generated &&
|
return rec->status.confirmed && !((rec->type == TransactionRecord::Generated || rec->type == TransactionRecord::StakeMint) &&
|
||||||
rec->status.maturity != TransactionStatus::Mature);
|
rec->status.maturity != TransactionStatus::Mature);
|
||||||
case FormattedAmountRole:
|
case FormattedAmountRole:
|
||||||
return formatTxAmount(rec, false);
|
return formatTxAmount(rec, false);
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ TransactionView::TransactionView(QWidget *parent) :
|
|||||||
typeWidget->addItem(tr("Sent to"), TransactionFilterProxy::TYPE(TransactionRecord::SendToAddress) |
|
typeWidget->addItem(tr("Sent to"), TransactionFilterProxy::TYPE(TransactionRecord::SendToAddress) |
|
||||||
TransactionFilterProxy::TYPE(TransactionRecord::SendToOther));
|
TransactionFilterProxy::TYPE(TransactionRecord::SendToOther));
|
||||||
typeWidget->addItem(tr("To yourself"), TransactionFilterProxy::TYPE(TransactionRecord::SendToSelf));
|
typeWidget->addItem(tr("To yourself"), TransactionFilterProxy::TYPE(TransactionRecord::SendToSelf));
|
||||||
|
typeWidget->addItem(tr("Mined"), TransactionFilterProxy::TYPE(TransactionRecord::StakeMint));
|
||||||
typeWidget->addItem(tr("Mined"), TransactionFilterProxy::TYPE(TransactionRecord::Generated));
|
typeWidget->addItem(tr("Mined"), TransactionFilterProxy::TYPE(TransactionRecord::Generated));
|
||||||
typeWidget->addItem(tr("Other"), TransactionFilterProxy::TYPE(TransactionRecord::Other));
|
typeWidget->addItem(tr("Other"), TransactionFilterProxy::TYPE(TransactionRecord::Other));
|
||||||
|
|
||||||
|
|||||||
@@ -1062,7 +1062,7 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
|
|||||||
path = GetDefaultDataDir();
|
path = GetDefaultDataDir();
|
||||||
}
|
}
|
||||||
if (fNetSpecific && GetBoolArg("-testnet", false))
|
if (fNetSpecific && GetBoolArg("-testnet", false))
|
||||||
path /= "testnet";
|
path /= "testnet2";
|
||||||
|
|
||||||
fs::create_directory(path);
|
fs::create_directory(path);
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ extern const std::string CLIENT_DATE;
|
|||||||
// network protocol versioning
|
// network protocol versioning
|
||||||
//
|
//
|
||||||
|
|
||||||
static const int PROTOCOL_VERSION = 60005;
|
static const int PROTOCOL_VERSION = 60006;
|
||||||
|
|
||||||
// earlier versions not supported as of Feb 2012, and are disconnected
|
// earlier versions not supported as of Feb 2012, and are disconnected
|
||||||
static const int MIN_PROTO_VERSION = 209;
|
static const int MIN_PROTO_VERSION = 209;
|
||||||
@@ -46,7 +46,7 @@ static const int MEMPOOL_GD_VERSION = 60002;
|
|||||||
|
|
||||||
#define DISPLAY_VERSION_MAJOR 0
|
#define DISPLAY_VERSION_MAJOR 0
|
||||||
#define DISPLAY_VERSION_MINOR 4
|
#define DISPLAY_VERSION_MINOR 4
|
||||||
#define DISPLAY_VERSION_REVISION 0
|
#define DISPLAY_VERSION_REVISION 1
|
||||||
#define DISPLAY_VERSION_BUILD 0
|
#define DISPLAY_VERSION_BUILD 0
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1479,7 +1479,7 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int
|
|||||||
CTxDB txdb("r");
|
CTxDB txdb("r");
|
||||||
if (!txNew.GetCoinAge(txdb, nCoinAge))
|
if (!txNew.GetCoinAge(txdb, nCoinAge))
|
||||||
return error("CreateCoinStake : failed to calculate coin age");
|
return error("CreateCoinStake : failed to calculate coin age");
|
||||||
nCredit += GetProofOfStakeReward(nCoinAge);
|
nCredit += GetProofOfStakeReward(nCoinAge, nBits, txNew.nTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
int64 nMinFee = 0;
|
int64 nMinFee = 0;
|
||||||
@@ -1838,7 +1838,8 @@ void CWallet::KeepKey(int64 nIndex)
|
|||||||
CWalletDB walletdb(strWalletFile);
|
CWalletDB walletdb(strWalletFile);
|
||||||
walletdb.ErasePool(nIndex);
|
walletdb.ErasePool(nIndex);
|
||||||
}
|
}
|
||||||
printf("keypool keep %"PRI64d"\n", nIndex);
|
if(fDebug)
|
||||||
|
printf("keypool keep %"PRI64d"\n", nIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWallet::ReturnKey(int64 nIndex)
|
void CWallet::ReturnKey(int64 nIndex)
|
||||||
@@ -1848,7 +1849,8 @@ void CWallet::ReturnKey(int64 nIndex)
|
|||||||
LOCK(cs_wallet);
|
LOCK(cs_wallet);
|
||||||
setKeyPool.insert(nIndex);
|
setKeyPool.insert(nIndex);
|
||||||
}
|
}
|
||||||
printf("keypool return %"PRI64d"\n", nIndex);
|
if(fDebug)
|
||||||
|
printf("keypool return %"PRI64d"\n", nIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CWallet::GetKeyFromPool(CPubKey& result, bool fAllowReuse)
|
bool CWallet::GetKeyFromPool(CPubKey& result, bool fAllowReuse)
|
||||||
|
|||||||
Reference in New Issue
Block a user