Skip to content

Commit 9f735c7

Browse files
author
deeponion
committed
fixed a fee issue and added latest checkpoints
1 parent c1d9f1b commit 9f735c7

File tree

5 files changed

+21
-5
lines changed

5 files changed

+21
-5
lines changed

src/checkpoints.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ namespace Checkpoints
5353
(1200000, uint256("0x0000000000044a81ecdf2d5d7b6a314ddc23d6aade3e3c91724c5b16ae70a081"))
5454
(1250000, uint256("0x000000000001ef93e11ef086b7df375f8312c2b504d63655f96c9240b142d43c"))
5555
(1300021, uint256("0x000000000000e4f01a75810a68958b831435d8d8778badda7cc108b0f1837180"))
56+
(1350006, uint256("0x00000000000283363cc3b6932640850e39c09b5e8989a1bc55cc5e074d737a61"))
57+
(1390072, uint256("0x000000000004cd4562361ac51ccd1887cf615ec4f142be6a551b92e2bd9c16ea"))
5658
;
5759

5860
// TestNet has no checkpoints

src/clientversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
99
#define CLIENT_VERSION_MAJOR 1
1010
#define CLIENT_VERSION_MINOR 8
11-
#define CLIENT_VERSION_REVISION 3
11+
#define CLIENT_VERSION_REVISION 5
1212
#define CLIENT_VERSION_BUILD 0
1313

1414
// Converts the parameter X to a string after macro replacement on X has been performed.

src/kernel.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ static std::map<int, unsigned int> mapStakeModifierCheckpoints =
4646
(1200000, 0x4328bd8fu)
4747
(1250000, 0xa3689d70u)
4848
(1300021, 0x6fa62d97u)
49+
(1350006, 0x469c6019u)
50+
(1390072, 0xaf6e8a1du)
4951
;
5052

5153
// Hard checkpoints of stake modifiers to ensure they are deterministic (testNet)

src/main.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ int64_t nTransactionFee = MIN_TX_FEE_NEW;
8282
int64_t nReserveBalance = 0;
8383
int64_t nMinimumInputValue = 0;
8484

85-
static const int NUM_OF_POW_CHECKPOINT = 29;
85+
static const int NUM_OF_POW_CHECKPOINT = 31;
8686
static const int checkpointPoWHeight[NUM_OF_POW_CHECKPOINT][2] =
8787
{
8888
{ 9601, 4611},
@@ -114,6 +114,8 @@ static const int checkpointPoWHeight[NUM_OF_POW_CHECKPOINT][2] =
114114
{1200000, 235100},
115115
{1250000, 243054},
116116
{1300021, 252612},
117+
{1350006, 261895},
118+
{1390072, 269386},
117119
};
118120

119121
extern enum Checkpoints::CPMode CheckpointsMode;
@@ -135,7 +137,10 @@ int64_t GetMinTxFee()
135137

136138
if(pindexBest->nHeight < SWITCH_BLOCK_HARD_FORK && !fTestNet)
137139
return MIN_TX_FEE;
138-
140+
141+
if((pindexBest->nHeight > SWITCH_BLOCK_DSBUG_START && pindexBest->nHeight < SWITCH_BLOCK_DSBUG_END) && !fTestNet)
142+
return MIN_TX_FEE_NEW2;
143+
139144
return MIN_TX_FEE_NEW;
140145
}
141146

@@ -146,7 +151,10 @@ int64_t GetMinRelayTxFee()
146151

147152
if(pindexBest->nHeight < SWITCH_BLOCK_HARD_FORK && !fTestNet)
148153
return MIN_RELAY_TX_FEE;
149-
154+
155+
if((pindexBest->nHeight > SWITCH_BLOCK_DSBUG_START && pindexBest->nHeight < SWITCH_BLOCK_DSBUG_END) && !fTestNet)
156+
return MIN_RELAY_TX_FEE_NEW2;
157+
150158
return MIN_RELAY_TX_FEE_NEW;
151159
}
152160

@@ -1718,7 +1726,7 @@ bool CTransaction::ConnectInputs(CTxDB& txdb, MapPrevTx inputs, map<uint256, CTx
17181726

17191727
// enforce transaction fees for every block
17201728
if (nTxFee < GetMinFee())
1721-
return fBlock? DoS(100, error("ConnectInputs() : %s not paying required fee=%s, paid=%s", GetHash().ToString().substr(0,10).c_str(), FormatMoney(GetMinFee()).c_str(), FormatMoney(nTxFee).c_str())) : false;
1729+
return fBlock? DoS(100, error("ConnectInputs() : %s not paying required fee=%s, paid=%s", GetHash().ToString().c_str(), FormatMoney(GetMinFee()).c_str(), FormatMoney(nTxFee).c_str())) : false;
17221730

17231731
nFees += nTxFee;
17241732
if (!MoneyRange(nFees))

src/main.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,15 @@ static const unsigned int MAX_INV_SZ = 50000;
3535
static const int64_t MIN_TX_FEE = 100000;
3636
static const int64_t MIN_RELAY_TX_FEE = MIN_TX_FEE;
3737
static const int64_t MIN_TX_FEE_NEW = 10000;
38+
static const int64_t MIN_TX_FEE_NEW2 = 5000;
3839
static const int64_t MIN_RELAY_TX_FEE_NEW = MIN_TX_FEE_NEW;
40+
static const int64_t MIN_RELAY_TX_FEE_NEW2 = MIN_TX_FEE_NEW2;
3941
static const int64_t MAX_MONEY = 25000000 * COIN;
4042
static const int64_t MAX_PROOF_OF_STAKE_STABLE = 0.01 * COIN;
4143
static const int64_t MIN_TXOUT_AMOUNT = MIN_TX_FEE_NEW;
4244
static const int SWITCH_BLOCK_HARD_FORK = 540000;
45+
static const int SWITCH_BLOCK_DSBUG_START = 1377000;
46+
static const int SWITCH_BLOCK_DSBUG_END = 1423000;
4347

4448
inline bool MoneyRange(int64_t nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
4549
// Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp.

0 commit comments

Comments
 (0)