Skip to content

Commit

Permalink
Merge pull request #72 from IamLupo/master
Browse files Browse the repository at this point in the history
Version 2.0.0.3
  • Loading branch information
IamLupo committed Aug 5, 2021
2 parents e34ff8e + aa6c897 commit 97d6a5b
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 42 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ src/DigitalNoted
*.patch
*.gch
*.exe
*.qm
.DigitalNote
DigitalNoted
DigitalNote-qt
Expand Down
1 change: 1 addition & 0 deletions DigitalNote.daemon.pro
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ include(include/msse2.pri)
include(include/daemon/qt_settings.pri)
include(include/daemon/headers.pri)
include(include/daemon/sources.pri)
include(include/daemon/translations.pri)

## Compile Options
include(include/options/use_update_alternatives.pri)
Expand Down
2 changes: 1 addition & 1 deletion DigitalNote_config.pri
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
DIGITALNOTE_VERSION_MAJOR = 2
DIGITALNOTE_VERSION_MINOR = 0
DIGITALNOTE_VERSION_REVISION = 0
DIGITALNOTE_VERSION_BUILD = 2
DIGITALNOTE_VERSION_BUILD = 3

DIGITALNOTE_LIB_LEVELDB_DIR = $${DIGITALNOTE_PATH}/src/leveldb
DIGITALNOTE_LIB_LEVELDB_NEW_DIR = $${DIGITALNOTE_PATH}/src/leveldb-2.11
Expand Down
3 changes: 3 additions & 0 deletions include/daemon/translations.pri
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# for lrelease/lupdate
# also add new translations to src/qt/bitcoin.qrc under translations/
TRANSLATIONS = $${DIGITALNOTE_PATH}/src/qt/locale/empty.ts
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define CLIENT_VERSION_MAJOR 2
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD 2
#define CLIENT_VERSION_BUILD 3

// Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
Expand Down
88 changes: 48 additions & 40 deletions src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,40 +240,44 @@ CBlock* CreateNewBlock(CReserveKey& reservekey, bool fProofOfStake, int64_t* pFe

if (!txPrev.ReadFromDisk(txdb, txin.prevout, txindex))
{
// This should never happen; all transactions in the memory
// pool should connect to either transactions in the chain
// or other transactions in the memory pool.
if (!mempool.mapTx.count(txin.prevout.hash))
{
LogPrintf("ERROR: mempool transaction missing input\n");

if (fDebug)
#ifdef ENABLE_ORPHAN_TRANSACTIONS
// This should never happen; all transactions in the memory
// pool should connect to either transactions in the chain
// or other transactions in the memory pool.
if (!mempool.mapTx.count(txin.prevout.hash))
{
assert("mempool transaction missing input" == 0);
}

fMissingInputs = true;

if (porphan)
LogPrintf("ERROR: mempool transaction missing input\n");

if (fDebug)
{
assert("mempool transaction missing input" == 0);
}

fMissingInputs = true;

if (porphan)
{
vOrphan.pop_back();
}

break;
}

// Has to wait for dependencies
if (!porphan)
{
vOrphan.pop_back();
// Use list for automatic deletion
vOrphan.push_back(COrphan(&tx));
porphan = &vOrphan.back();
}

break;
}

// Has to wait for dependencies
if (!porphan)
{
// Use list for automatic deletion
vOrphan.push_back(COrphan(&tx));
porphan = &vOrphan.back();
}

mapDependers[txin.prevout.hash].push_back(porphan);
porphan->setDependsOn.insert(txin.prevout.hash);
nTotalIn += mempool.mapTx[txin.prevout.hash].vout[txin.prevout.n].nValue;

mapDependers[txin.prevout.hash].push_back(porphan);
porphan->setDependsOn.insert(txin.prevout.hash);
nTotalIn += mempool.mapTx[txin.prevout.hash].vout[txin.prevout.n].nValue;
#else // ENABLE_ORPHAN_TRANSACTIONS
fMissingInputs = true;
#endif // ENABLE_ORPHAN_TRANSACTIONS

continue;
}

Expand All @@ -297,16 +301,20 @@ CBlock* CreateNewBlock(CReserveKey& reservekey, bool fProofOfStake, int64_t* pFe
// client code rounds up the size to the nearest 1K. That's good, because it gives an
// incentive to create smaller transactions.
double dFeePerKb = double(nTotalIn-tx.GetValueOut()) / (double(nTxSize)/1000.0);

if (porphan)
{
porphan->dPriority = dPriority;
porphan->dFeePerKb = dFeePerKb;
}
else
{
vecPriority.push_back(TxPriority(dPriority, dFeePerKb, &(*mi).second));
}

#ifdef ENABLE_ORPHAN_TRANSACTIONS
if (porphan)
{
porphan->dPriority = dPriority;
porphan->dFeePerKb = dFeePerKb;
}
else
{
vecPriority.push_back(TxPriority(dPriority, dFeePerKb, &(*mi).second));
}
#else // ENABLE_ORPHAN_TRANSACTIONS
vecPriority.push_back(TxPriority(dPriority, dFeePerKb, &(*mi).second));
#endif // ENABLE_ORPHAN_TRANSACTIONS
}

// Collect transactions into block
Expand Down
3 changes: 3 additions & 0 deletions src/qt/locale/empty.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" ?><!DOCTYPE TS>
<TS language="ky" version="2.1">
</TS>

0 comments on commit 97d6a5b

Please sign in to comment.