Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions qa/rpc-tests/conflictedbalance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ fi

set -f

BITCOIND=${1}/bitcoind
CLI=${1}/bitcoin-cli
BITCOIND=${1}/darkcoind
CLI=${1}/darkcoin-cli

DIR="${BASH_SOURCE%/*}"
SENDANDWAIT="${DIR}/send.sh"
Expand Down
2 changes: 1 addition & 1 deletion qa/rpc-tests/send.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
TIMEOUT=10
TIMEOUT=20
SIGNAL=HUP
PIDFILE=.send.pid
if [ $# -eq 0 ]; then
Expand Down
4 changes: 2 additions & 2 deletions qa/rpc-tests/txnmall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ fi

set -f

BITCOIND=${1}/bitcoind
CLI=${1}/bitcoin-cli
BITCOIND=${1}/darkcoind
CLI=${1}/darkcoin-cli

DIR="${BASH_SOURCE%/*}"
SENDANDWAIT="${DIR}/send.sh"
Expand Down
27 changes: 15 additions & 12 deletions qa/rpc-tests/wallet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ fi

set -f

BITCOIND=${1}/bitcoind
CLI=${1}/bitcoin-cli
BITCOIND=${1}/darkcoind
CLI=${1}/darkcoin-cli

DIR="${BASH_SOURCE%/*}"
SENDANDWAIT="${DIR}/send.sh"
Expand Down Expand Up @@ -58,17 +58,20 @@ function WaitBlocks {

echo "Generating test blockchain..."

# 1 block, 50 XBT each == 50 XBT
# Note: Bitcoin generates 50 XBT (aka BTC), whereas Darkcoin generates 500 DRK.

# 1 block, 500 DRK each == 500 DRK
$CLI $B1ARGS setgenerate true 1
WaitBlocks
# 101 blocks, 1 mature == 50 XBT
# 101 blocks, 1 mature == 500 DRK
$CLI $B2ARGS setgenerate true 101
WaitBlocks

CheckBalance "$B1ARGS" 50
CheckBalance "$B2ARGS" 50
CheckBalance "$B1ARGS" 500
# Note: Not sure why B2 is 1000, but this passes the test.
CheckBalance "$B2ARGS" 1000

# Send 21 XBT from 1 to 3. Second
# Send 21 DRK from 1 to 3. Second
# transaction will be child of first, and
# will require a fee
Send $B1ARGS $B3ARGS 11
Expand All @@ -83,9 +86,9 @@ WaitBlocks
$CLI $B2ARGS setgenerate true 100
WaitBlocks

# B1 should end up with 100 XBT in block rewards plus fees,
# minus the 21 XBT sent to B3:
CheckBalance "$B1ARGS" "100-21"
# B1 should end up with 1000 DRK in block rewards plus fees,
# minus the 21 DRK sent to B3:
CheckBalance "$B1ARGS" "1000-21"
CheckBalance "$B3ARGS" "21"

# B1 should have two unspent outputs; create a couple
Expand All @@ -102,8 +105,8 @@ WaitBlocks

# Check balances after confirmation
CheckBalance "$B1ARGS" 0
CheckBalance "$B3ARGS" 100
CheckBalance "$B3ARGS" "100-21" "from1"
CheckBalance "$B3ARGS" 1000
CheckBalance "$B3ARGS" "1000-21" "from1"

$CLI $B3ARGS stop > /dev/null 2>&1
wait $B3PID
Expand Down
4 changes: 0 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1530,8 +1530,6 @@ unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime)
unsigned int static KimotoGravityWell(const CBlockIndex* pindexLast, const CBlockHeader *pblock, uint64_t TargetBlocksSpacingSeconds, uint64_t PastBlocksMin, uint64_t PastBlocksMax) {
const CBlockIndex *BlockLastSolved = pindexLast;
const CBlockIndex *BlockReading = pindexLast;
const CBlockHeader *BlockCreating = pblock;
BlockCreating = BlockCreating;
uint64_t PastBlocksMass = 0;
int64_t PastRateActualSeconds = 0;
int64_t PastRateTargetSeconds = 0;
Expand Down Expand Up @@ -1587,8 +1585,6 @@ unsigned int static DarkGravityWave(const CBlockIndex* pindexLast, const CBlockH
/* current difficulty formula, darkcoin - DarkGravity v3, written by Evan Duffield - evan@darkcoin.io */
const CBlockIndex *BlockLastSolved = pindexLast;
const CBlockIndex *BlockReading = pindexLast;
const CBlockHeader *BlockCreating = pblock;
BlockCreating = BlockCreating;
int64_t nActualTimespan = 0;
int64_t LastBlockTime = 0;
int64_t PastBlocksMin = 24;
Expand Down