Skip to content

Commit

Permalink
Merge pull request #202 from VerusCoin/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Asherda authored Jan 31, 2019
2 parents 160e7cd + c1dfcf8 commit 1dc8422
Show file tree
Hide file tree
Showing 14 changed files with 1,130 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ stages:
####START#### PROJECT LEVEL VARIABLES ####START####
########################################################################################################################
variables:
VERSION: 0.5.4
VERSION: 0.5.5
VERUS_CLI_LINUX: Verus-CLI-Linux-v${VERSION}.tar.gz
VERUS_CLI_WINDOWS: Verus-CLI-Windows-v${VERSION}.zip
VERUS_CLI_MACOS: Verus-CLI-MacOS-v${VERSION}.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## VerusCoin version 0.5.4 with VerusHash 2.0
## VerusCoin version 0.5.5 with VerusHash 2.0

Arguably the world's most advanced technology, zero knowledge privacy-centric blockchain, Verus Coin brings Sapling performance and zero knowledge features to an intelligent system with interchain smart contracts and a completely original, combined proof of stake/proof of work consensus algorithm that solves the nothing at stake problem. With this and its approach towards CPU mining and ASICs, Verus Coin strives to be one of the most naturally decentralizing and attack resistant blockchains in existence.

Expand Down
2 changes: 1 addition & 1 deletion doc/man/verus-cli/linux/README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VerusCoin Command Line Tools v0.5.4
VerusCoin Command Line Tools v0.5.5

Contents:
komodod - VerusCoin's enhanced Komodo daemon
Expand Down
2 changes: 1 addition & 1 deletion doc/man/verus-cli/mac/README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VerusCoin Command Line Tools v0.5.4
VerusCoin Command Line Tools v0.5.5
Contents:
komodod - VerusCoin's enhanced Komodo daemon.
komodo-cli - VerusCoin's enhanced Komodo command line utility.
Expand Down
2 changes: 1 addition & 1 deletion doc/man/verus-cli/windows/README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VerusCoin Command Line Tools v0.5.4
VerusCoin Command Line Tools v0.5.5
Contents:
komodod.exe - VerusCoin's enhanced Komodo daemon
komodo-cli.exe - VerusCoin's Komodo command line utility
Expand Down
15 changes: 8 additions & 7 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1571,13 +1571,6 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
return state.DoS(0, false, REJECT_NONSTANDARD, "non-final");
}

// if this is a valid stake transaction, don't put it in the mempool
CStakeParams p;
if (ValidateStakeTransaction(tx, p, false))
{
return state.DoS(0, false, REJECT_INVALID, "staking");
}

// is it already in the memory pool?
uint256 hash = tx.GetHash();
if (pool.exists(hash))
Expand Down Expand Up @@ -1659,6 +1652,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
return state.Invalid(error("AcceptToMemoryPool: inputs already spent"),REJECT_DUPLICATE, "bad-txns-inputs-spent");
}
}

// are the joinsplit's requirements met?
if (!view.HaveJoinSplitRequirements(tx))
{
Expand Down Expand Up @@ -1693,6 +1687,13 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
return state.DoS(1, error("AcceptToMemoryPool: too many sigops %s, %d > %d", hash.ToString(), nSigOps, MAX_STANDARD_TX_SIGOPS),REJECT_NONSTANDARD, "bad-txns-too-many-sigops");
}

// if this is a valid stake transaction, don't put it in the mempool
CStakeParams p;
if (ValidateStakeTransaction(tx, p, false))
{
return state.DoS(0, false, REJECT_INVALID, "staking");
}

CAmount nValueOut = tx.GetValueOut();
CAmount nFees = nValueIn-nValueOut;
double dPriority = view.GetPriority(tx, chainActive.Height());
Expand Down
9 changes: 6 additions & 3 deletions src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1993,7 +1993,10 @@ void static BitcoinMiner()
{
}
}
if (fGenerate == true && VERUS_CHEATCATCHER.size() > 0)

VERUS_MINTBLOCKS = (VERUS_MINTBLOCKS && pwallet != NULL && ASSETCHAINS_LWMAPOS != 0);

if ((fGenerate == true || VERUS_MINTBLOCKS) && VERUS_CHEATCATCHER.size() > 0)
{
if (cheatCatcher == boost::none)
{
Expand Down Expand Up @@ -2023,13 +2026,13 @@ void static BitcoinMiner()
if ( nThreads == 0 && ASSETCHAINS_STAKED )
nThreads = 1;

if ((nThreads == 0 || !fGenerate) && (VERUS_MINTBLOCKS == 0 || pwallet == NULL))
if (!fGenerate && !VERUS_MINTBLOCKS)
return;

minerThreads = new boost::thread_group();

#ifdef ENABLE_WALLET
if (ASSETCHAINS_LWMAPOS != 0 && VERUS_MINTBLOCKS)
if (VERUS_MINTBLOCKS)
{
minerThreads->create_thread(boost::bind(&VerusStaker, pwallet));
}
Expand Down
12 changes: 11 additions & 1 deletion src/primitives/block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,17 @@ uint256 CBlockHeader::GetVerusV2Hash() const
{
if (nVersion == VERUS_V2)
{
return SerializeVerusHashV2b(*this);
if (CConstVerusSolutionVector::IsPBaaS(nSolution) == 1)
{
// hash canonical header if this is merge-mine capable
CBlockHeader bh = CBlockHeader(*this);
bh.SetCanonicalPBaaSHeader();
return SerializeVerusHashV2b(bh);
}
else
{
return SerializeVerusHashV2b(*this);
}
}
else
{
Expand Down
Loading

0 comments on commit 1dc8422

Please sign in to comment.