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 30570.
Execute this command, replacing the process ID with the correct ID on your system.
kill 30570
If these were real bitcoins, you'd want to archive them instead of deleting them, of course. But we are using "regtest" fake coins that aren't worth any money.
Execute these commands:
cd
rm -rf .bitcoin
cd
mkdir .bitcoin
nano .bitcoin/bitcoin.conf
Paste in these lines, replacing the
password with something unique:
rpcuser=bitcoinrpc
rpcpassword=7bLjxV1CKhNJmdxTUMxTpF4vEemWCp49kMX9CwvZabYi
addnode=ad.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 18444,
as shown below. If it doesn't,
try waiting a minute and trying again.
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://ad.samsclass.info/faucet.htm
Enter your Samcoin address into the form. Solve the CAPTCHA, as shown below, and click Submit.
You see a message saying "You won a Samcoin!", as shown below.
bitcoin-cli -regtest getbalance
Your balance is now 1 Samcoin,
as shown below.
Execute this command to send that many Samcoins back to me, replacing "YOUR NAME" with your own name, and replacing "0.1337" with your chosen amount.
bitcoin-cli -regtest sendtoaddress n3gHZ98jeDWrR5JEZkS1Rnxfy3Krn6LNQy 0.1337
The reply shows the Transaction ID,
as shown below.
Capture a full-screen image.
YOU MUST SUBMIT A FULL-SCREEN IMAGE FOR FULL CREDIT!
Save the image with the filename "YOUR NAME Proj 8a", replacing "YOUR NAME" with your real name.
bitcoin-cli -regtest generate 100
You see 100 block hashes,
as shown below.
http://ad.samsclass.info/faucet.htm
Look at the bottom. Find your transaction, as shown below.
Capture a full-screen image.
YOU MUST SUBMIT A FULL-SCREEN IMAGE FOR FULL CREDIT!
Save the image with the filename "YOUR NAME Proj 8b", replacing "YOUR NAME" with your real name.
Posted 6-2-16 by Sam Bowne
Updated 6-11-17