Skip to content

Commit

Permalink
cleanup (#92)
Browse files Browse the repository at this point in the history
* Revert "Sugarchain: add: MAKE WARNING at <pow.cpp>"
This reverts commit 617f6c6.
* fix: BLOCK_CHAIN_SIZE
* remove: disable QT log
* travis: msse2_32bit disabled (slow "make check")
* update: makeseeds.py upto 33
* comment out
  • Loading branch information
decryp2kanon committed Mar 2, 2020
1 parent 6946f74 commit a830492
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ env:
GOAL="install"
BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++"
USE_SHELL="/bin/dash"
YESPOWER_OPTION="$YESPOWER_OPTION $YESPOWER_MSSE2_32BIT"
# disabled (slow "make check") # YESPOWER_OPTION="$YESPOWER_OPTION $YESPOWER_MSSE2_32BIT"
# Win64
- >
HOST=x86_64-w64-mingw32
Expand Down
12 changes: 7 additions & 5 deletions contrib/linearize/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ Construct a linear, no-fork, best version of the Bitcoin blockchain. The scripts
run using Python 3 but are compatible with Python 2.

## Warning
Do not use `-txindex=1` in this script.
Do not use `-txindex=1` in this script.

## Stop 0: Fix `max_height` in `linearize.cfg`
## Step 1:
Fix `max_height` in `linearize.cfg`

## Step 1: Download hash list
## Step 1.1: Download hash list

$ ./linearize-hashes.py linearize.cfg > hashlist.txt

Expand All @@ -28,12 +29,13 @@ the same data no matter which byte format is chosen.
The `linearize-hashes` script requires a connection, local or remote, to a
JSON-RPC server. Running `bitcoind` or `bitcoin-qt -server` will be sufficient.

## Step 1.1: Change absolute location in `linearize.cfg`
## Step 1.2:
Change absolute location in `linearize.cfg`

input=/home/{USERNAME}/.sugarchain/blocks
output_file=/home/{USERNAME}/Desktop/bootstrap.dat

## Step 1.2: Check outputs
## Step 1.3: Check outputs

$ head -1 hashlist.txt # genesis
7d5eaec2dbb75f99feadfa524c78b7cabc1d8c8204f79d4f3a83381b811b0adc
Expand Down
2 changes: 1 addition & 1 deletion contrib/seeds/makeseeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
PATTERN_ONION = re.compile(r"^([abcdefghijklmnopqrstuvwxyz234567]{16}\.onion):(\d+)$")
PATTERN_AGENT = re.compile(
r"^/Yumekawa:("
r"0.16.(3).(21|23|24|25|26|27|28|29)|"
r"0.16.(3).(21|23|24|25|26|27|28|29|30|31|32|33)|"
r"0.19.99"
r")")

Expand Down
2 changes: 1 addition & 1 deletion src/httpserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <functional>

static const int DEFAULT_HTTP_THREADS=4;
static const int DEFAULT_HTTP_WORKQUEUE=128; // FIXME.SUGAR
static const int DEFAULT_HTTP_WORKQUEUE=128; // was 16 // FIXME.SUGAR // for huge RPC calling
static const int DEFAULT_HTTP_SERVER_TIMEOUT=30;

struct evhttp_request;
Expand Down
5 changes: 1 addition & 4 deletions src/pow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
// Comparing to pindexLast->nHeight with >= because this function
// returns the work required for the block after pindexLast.
if (params.nPowAllowMinDifficultyBlocksAfterHeight != boost::none &&
pindexLast->nHeight >= params.nPowAllowMinDifficultyBlocksAfterHeight.get()) // FIXME.SUGAR
// BEGIN - ADD MAKE WARNING
#warning "Note: 'pindexLast->nHeight >= params.nPowAllowMinDifficultyBlocksAfterHeight.get()' That's OK.";
// END - ADD MAKE WARNING
pindexLast->nHeight >= params.nPowAllowMinDifficultyBlocksAfterHeight.get())
{
// Special difficulty rule for testnet:
// If the new block's timestamp is more than 6 * 2.5 minutes
Expand Down
2 changes: 1 addition & 1 deletion src/qt/intro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

static const uint64_t GB_BYTES = 1000000000LL;
/* Minimum free space (in GB) needed for data directory */
static const uint64_t BLOCK_CHAIN_SIZE = 4; // inaccurate size
static const uint64_t BLOCK_CHAIN_SIZE = 2; // inaccurate size
/* Minimum free space (in GB) needed for data directory when pruned; Does not include prune target */
static const uint64_t CHAIN_STATE_SIZE = 1; // inaccurate size // should INT
/* Total required space (in GB) depending on user choice (prune, not prune) */
Expand Down
2 changes: 1 addition & 1 deletion src/qt/receivecoinsdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ReceiveCoinsDialog : public QDialog

public:
enum ColumnWidths {
DATE_COLUMN_WIDTH = 139, // FIXME.SUGAR was 130
DATE_COLUMN_WIDTH = 139, // FIXME.SUGAR // was 130
LABEL_COLUMN_WIDTH = 120,
AMOUNT_MINIMUM_COLUMN_WIDTH = 180,
MINIMUM_COLUMN_WIDTH = 130
Expand Down
4 changes: 2 additions & 2 deletions src/qt/transactionview.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ class TransactionView : public QWidget
enum ColumnWidths {
STATUS_COLUMN_WIDTH = 30,
WATCHONLY_COLUMN_WIDTH = 23,
DATE_COLUMN_WIDTH = 139, // FIXME.SUGAR was 120
DATE_COLUMN_WIDTH = 139, // FIXME.SUGAR // was 120
TYPE_COLUMN_WIDTH = 113,
AMOUNT_MINIMUM_COLUMN_WIDTH = 139, // FIXME.SUGAR was 120
AMOUNT_MINIMUM_COLUMN_WIDTH = 139, // FIXME.SUGAR // was 120
MINIMUM_COLUMN_WIDTH = 23
};

Expand Down
4 changes: 4 additions & 0 deletions src/qt/walletmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,22 @@ void WalletModel::pollBalanceChanged()
fForceCheckBalanceChanged = false;

// BEGIN - DEBUG for checking height?
/*
LogPrint(BCLog::QT, "GUI: %d = height \n", chainActive.Height());
LogPrint(BCLog::QT, "GUI: %d = cached \n", cachedNumBlocks);
LogPrint(BCLog::QT, "GUI: height - cached = %d \n", (int)(chainActive.Height() - cachedNumBlocks));
*/
// END - DEBUG for checking height?

// FIXME.SUGAR // SURE?
// update every blocks >> 12 blocks // 5*12 = 60s
if(chainActive.Height() - cachedNumBlocks >= 12)
{
// BEGIN - DEBUG for checking polled?
/*
LogPrint(BCLog::QT, "GUI: \033[0;31m pollBalanceChanged: \033[0m \n"); // red
LogPrint(BCLog::QT, "GUI: height - cached = %d \n", (int)(chainActive.Height() - cachedNumBlocks));
*/
// END - DEBUG for checking polled?

// Balance and number of transactions might have changed
Expand Down
1 change: 1 addition & 0 deletions src/txdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ bool CBlockTreeDB::LoadBlockIndexGuts(const Consensus::Params& consensusParams,
// While it is technically feasible to verify the PoW, doing so takes several minutes as it
// requires recomputing every PoW hash during every Litecoin startup.
// We opt instead to simply trust the data that is on your local disk.

//if (!CheckProofOfWork(pindexNew->GetBlockHash(), pindexNew->nBits, consensusParams))
// return error("%s: CheckProofOfWork failed: %s", __func__, pindexNew->ToString());

Expand Down

0 comments on commit a830492

Please sign in to comment.