Proj Bitcoin 1: Setting up a Private Regtest Blockchain
Proj Bitcoin 2: Adding a Second Node to your Private Regtest Blockchain
Samcoins aren't worth any real money. The purpose of this project is merely to learn how blockchain technology works, not to get rich quick.
netstat -pant
Find the process ID of the bitcoind process.
In the figure below, it's 5508.
Execute this command, replacing the process ID with the correct ID on your system.
kill 5508
Execute these commands:
cd
mv .bitcoin .old-bitcoin
cd
mkdir .bitcoin
nano .bitcoin/bitcoin.conf
Paste in these lines, replacing the
password with something unique:
rpcuser=bitcoinrpc
rpcpassword=7bLjxV1CKhNJmdxTUMxTpF4vEemWCp49kMX9CwvZabYi
addnode=attack.samsclass.info
as shown below.
Press Ctrl+X, Y, Enter to save the file.
bitcoind -regtest -daemon
Execute this command to see listening
processes:
netstat -pant
You should see a connection to my remote
server on port 18333,
as shown below.
bitcoin-cli -regtest getinfo
The blockchain should have more than
100 blocks,
as shown below.
bitcoin-cli -regtest getbalance
Your balance is 0,
as shown below.
bitcoin-cli -regtest getnewaddress
The address appears,
as shown below.
http://attack.samsclass.info/faucet.htm
Enter your Samcoin address into the form. Solve the CAPTCHA, as shown below, and click Submit.
bitcoin-cli -regtest getbalance
Your balance is now 1 Samcoin,
as shown below.