Restore Quark proof-of-work mining
This commit is contained in:
@@ -4,6 +4,7 @@ set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
JOBS="${JOBS:-1}"
|
||||
MODE="${MODE:-daemon}"
|
||||
DAEMON_TARGETS="${DAEMON_TARGETS:-agrariand agrarian-cli agrarian-tx}"
|
||||
HOST="${HOST:-$("$ROOT/depends/config.guess")}"
|
||||
PREFIX="$ROOT/depends/$HOST"
|
||||
BASE_CONFIG="$PREFIX/share/config.site"
|
||||
@@ -65,5 +66,9 @@ case "$MODE" in
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "$MODE" == "daemon" ]]; then
|
||||
make -j"$JOBS" $DAEMON_TARGETS
|
||||
else
|
||||
make -j"$JOBS"
|
||||
fi
|
||||
echo "Linux $MODE build complete."
|
||||
|
||||
@@ -15,10 +15,7 @@
|
||||
|
||||
uint256 CBlockHeader::GetHash() const
|
||||
{
|
||||
if(nVersion < 4)
|
||||
return HashQuark(BEGIN(nVersion), END(nNonce));
|
||||
|
||||
return Hash(BEGIN(nVersion), END(nAccumulatorCheckpoint));
|
||||
}
|
||||
|
||||
uint256 CBlock::BuildMerkleTree(bool* fMutated) const
|
||||
|
||||
@@ -605,6 +605,7 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp)
|
||||
result.push_back(Pair("curtime", pblock->GetBlockTime()));
|
||||
result.push_back(Pair("bits", strprintf("%08x", pblock->nBits)));
|
||||
result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight + 1)));
|
||||
result.push_back(Pair("acc_checkpoint", pblock->nAccumulatorCheckpoint.GetHex()));
|
||||
result.push_back(Pair("votes", aVotes));
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user