Skip to content

Commit

Permalink
Checkpoints, transaction pool and general improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ducknote committed Sep 4, 2014
1 parent 1e46aa2 commit e9dcc98
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/crypto/tree-hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void tree_hash(const char (*hashes)[HASH_SIZE], size_t count, char *root_hash) {
size_t i, j;
size_t cnt = count - 1;
char (*ints)[HASH_SIZE];
for (i = 1; i < sizeof(size_t); i <<= 1) {
for (i = 1; i < 8 * sizeof(size_t); i <<= 1) {
cnt |= cnt >> i;
}
cnt &= ~(cnt >> 1);
Expand Down
4 changes: 2 additions & 2 deletions src/cryptonote_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
#define CRYPTONOTE_LOCKED_TX_ALLOWED_DELTA_SECONDS DIFFICULTY_TARGET * CRYPTONOTE_LOCKED_TX_ALLOWED_DELTA_BLOCKS
#define CRYPTONOTE_LOCKED_TX_ALLOWED_DELTA_BLOCKS 1

#define CRYPTONOTE_MEMPOOL_TX_LIVETIME (60*60*24) //seconds, one day
#define CRYPTONOTE_MEMPOOL_TX_FROM_ALT_BLOCK_LIVETIME (60*60*24*7) //seconds, one week
#define CRYPTONOTE_MEMPOOL_TX_LIVETIME (60*60*14) //seconds, 14 hours
#define CRYPTONOTE_MEMPOOL_TX_FROM_ALT_BLOCK_LIVETIME (60*60*24) //seconds, one day

#define DIFFICULTY_BLOCKS_ESTIMATE_TIMESPAN DIFFICULTY_TARGET //just alias

Expand Down
3 changes: 2 additions & 1 deletion src/cryptonote_core/checkpoints_create.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ namespace cryptonote {
ADD_CHECKPOINT(1100, "990a83b3e77ba5def86311da34793e09fa3b0a2875571bd59449173fddf4e129");
ADD_CHECKPOINT(4200, "76af92fc41eadf9c99df91efc08011d0fce6f3f55b131da2449c187f432f91f7");
ADD_CHECKPOINT(11000, "970c15459e4d484166c36e303fcf35886e14633b40b1fe4e3f250eb03eaca1f8");

ADD_CHECKPOINT(22000, "ae9ab36c4ff2cf215d49ffa4358d108dd777b8897c2d873a064dc103fea2b5ab");
ADD_CHECKPOINT(33000, "3fac95a900e65391d693e2cb331a26c757595baac133b9fa24936dd50fc7465f");
return true;
}
}
1 change: 1 addition & 0 deletions src/cryptonote_core/cryptonote_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ namespace cryptonote

m_store_blockchain_interval.do_call(boost::bind(&blockchain_storage::store_blockchain, &m_blockchain_storage));
m_miner.on_idle();
m_mempool.on_idle();
return true;
}
//-----------------------------------------------------------------------------------------------
Expand Down

1 comment on commit e9dcc98

@ducknote
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

22000 and 33000 block checkpoints,
Transaction livetime in TX pool changed from 24 hours to 14 hours,
Alt block transaction livetime in TX pool changed from 7 days to 1 day,
Fixes.

Please sign in to comment.