Skip to content

Commit

Permalink
Merge pull request #31 from zcoinofficial/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
nopslide authored Oct 27, 2016
2 parents 9ddb123 + 00a0365 commit bdd9177
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
15 changes: 11 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#############################################################################
# Makefile for building: zcoin-qt
# Generated by qmake (2.01a) (Qt 4.8.7) on: Wed Oct 5 19:10:17 2016
# Generated by qmake (2.01a) (Qt 4.8.7) on: Tue Oct 25 13:51:37 2016
# Project: zcoin.pro
# Template: app
# Command: /usr/lib/x86_64-linux-gnu/qt4/bin/qmake -spec /usr/share/qt4/mkspecs/linux-g++-64 -o Makefile zcoin.pro
Expand Down Expand Up @@ -400,7 +400,7 @@ dist:

clean:compiler_clean
-$(DEL_FILE) $(OBJECTS)
-$(DEL_FILE) /home/bushido/Desktop/zcoin/src/leveldb/libleveldb.a; cd /home/bushido/Desktop/zcoin/src/leveldb ; $(MAKE) clean
-$(DEL_FILE) "/home/bushido/Desktop/zcoin"/src/leveldb/libleveldb.a; cd "/home/bushido/Desktop/zcoin"/src/leveldb ; $(MAKE) clean
-$(DEL_FILE) *~ core *.core


Expand All @@ -412,10 +412,10 @@ distclean: clean


/home/bushido/Desktop/zcoin/src/leveldb/libleveldb.a: FORCE
cd /home/bushido/Desktop/zcoin/src/leveldb && CC=gcc CXX=g++ $(MAKE) OPT="-m64 -pipe -fstack-protector-all -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -O2" libleveldb.a libmemenv.a
cd "/home/bushido/Desktop/zcoin"/src/leveldb && CC=gcc CXX=g++ $(MAKE) OPT="-m64 -pipe -fstack-protector-all -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -O2" libleveldb.a libmemenv.a

/home/bushido/Desktop/zcoin/build/build.h: FORCE
cd /home/bushido/Desktop/zcoin; /bin/sh share/genbuild.sh /home/bushido/Desktop/zcoin/build/build.h
cd "/home/bushido/Desktop/zcoin"; /bin/sh share/genbuild.sh "/home/bushido/Desktop/zcoin"/build/build.h

check: first

Expand Down Expand Up @@ -1039,6 +1039,9 @@ build/addresstablemodel.o: src/qt/addresstablemodel.cpp src/qt/addresstablemodel

build/optionsdialog.o: src/qt/optionsdialog.cpp src/qt/optionsdialog.h \
build/ui_optionsdialog.h \
src/qt/bitcoinamountfield.h \
src/qt/qvalidatedlineedit.h \
src/qt/qvaluecombobox.h \
src/qt/bitcoinunits.h \
src/qt/monitoreddatamapper.h \
src/netbase.h \
Expand Down Expand Up @@ -1107,6 +1110,7 @@ build/sendcoinsdialog.o: src/qt/sendcoinsdialog.cpp src/qt/sendcoinsdialog.h \

build/coincontroldialog.o: src/qt/coincontroldialog.cpp src/qt/coincontroldialog.h \
build/ui_coincontroldialog.h \
src/qt/coincontroltreewidget.h \
src/init.h \
src/wallet.h \
src/main.h \
Expand Down Expand Up @@ -1173,6 +1177,7 @@ build/addressbookpage.o: src/qt/addressbookpage.cpp src/qt/addressbookpage.h \

build/signverifymessagedialog.o: src/qt/signverifymessagedialog.cpp src/qt/signverifymessagedialog.h \
build/ui_signverifymessagedialog.h \
src/qt/qvalidatedlineedit.h \
src/qt/addressbookpage.h \
src/base58.h \
src/bignum.h \
Expand Down Expand Up @@ -2466,6 +2471,8 @@ build/crypter.o: src/crypter.cpp src/crypter.h \

build/sendcoinsentry.o: src/qt/sendcoinsentry.cpp src/qt/sendcoinsentry.h \
build/ui_sendcoinsentry.h \
src/qt/bitcoinamountfield.h \
src/qt/qvalidatedlineedit.h \
src/qt/guiutil.h \
src/qt/bitcoinunits.h \
src/qt/addressbookpage.h \
Expand Down
11 changes: 10 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5839,6 +5839,9 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
unsigned int nBlockMinSize = GetArg("-blockminsize", 0);
nBlockMinSize = std::min(nBlockMaxSize, nBlockMinSize);

unsigned int COUNT_SPEND_ZC_TX = 0;
unsigned int MAX_SPEND_ZC_TX_PER_BLOCK = 1;

// Collect memory pool transactions into the block
int64 nFees = 0;
{
Expand All @@ -5861,7 +5864,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
vector<TxPriority> vecPriority;
vecPriority.reserve(mempool.mapTx.size());

printf("mempool.mapTx.size() = %d\n", mempool.mapTx.size());
// printf("mempool.mapTx.size() = %d\n", mempool.mapTx.size());

for (map<uint256, CTransaction>::iterator mi = mempool.mapTx.begin(); mi != mempool.mapTx.end(); ++mi)
{
Expand All @@ -5871,6 +5874,11 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)

if (tx.IsZerocoinSpend())
{

if (COUNT_SPEND_ZC_TX >= MAX_SPEND_ZC_TX_PER_BLOCK) {
continue;
}

//mempool.countZCSpend--;
// Size limits
unsigned int nTxSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION);
Expand Down Expand Up @@ -5899,6 +5907,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
++nBlockTx;
nBlockSigOps += nTxSigOps;
nFees += nTxFees;
COUNT_SPEND_ZC_TX++;
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion zcoin.pro.user
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.5.1, 2016-10-23T06:54:01. -->
<!-- Written by QtCreator 3.5.1, 2016-10-25T11:30:37. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
Expand Down

0 comments on commit bdd9177

Please sign in to comment.