Thanks for time and answering
At first I wrote sth like this
#!/bin/bash
for j in $(seq 1 50);
do
for i in $(seq 0 9);
do
bitcoin-cli -datadir=$i generate 2 #&>/dev/null
done
done
I changed the difficulty in the GetDifficulty() function in the following file.
~/bitcoin/src/rpc/blockchain.cpp.
I set a huge big number such as 99999999999999999.
double GetDifficulty(const CBlockIndex* blockindex)
{
return 99999999999999999;
// the same as original. without change
}
but nothing changed after recomiple and run it again.
I changed it to sth like this
#!/bin/bash
TotalNodes=$((10))
for j in $(seq 1 100);
do
buyerNode=$(($RANDOM%$TotalNodes))
sellerNode=$(($RANDOM%$TotalNodes))
if test $buyerNode -ne $sellerNode; then
sellerBalance=$(bitcoin-cli -datadir=$sellerNode getbalance)
sellerBalance=${sellerBalance%.*}
echo "seller balance: $sellerBalance"
sellerBalance=$(( sellerBalance - 1 ))
if test $sellerBalance -ge 0; then
bitcoin-cli -datadir=$sellerNode generatetoaddress 1 ${Address[$buyerNode]}
fi
fi
done
however, I have not seen any changes and the block made almost immediately.
then I decided to use 'getblocktemplate' to try to solve it by cgminer. the point is the template is truly uncompleted and transaction field is empty.
I simply want to know the difference between block generation speed in two cases; when difficulty is set to 1 and when is changed to 1.0e+15.
difficulty= 1.0 --> block generation speed = ?
difficulty= 1.0e+15 --> block generation speed = ?