1. We have already used some commands in previous lectures, let’s find them in the list and verify how they are described. Can you find getnewaddress and getbalance in the list? Does the description for what the commands do?
Returns a new bitcoin address for receiving payments. If [account] is specified payments received with the address will be credited to [account].
If [account] is not specified, returns the server’s total available balance.
If [account] is specified, returns the balance in the account.
Both make sense, the list is also very helpful to find extra options in the commands.
@Capaburro post on top was also helpful! As i first installed the latest Bitcoin core, but some things showed in the course have being outdated. Then i moved to just install the Bitcoin Core 17.1 which is the version the course was recorded with. (But then i don’t learn the updated correct way) So the help for all commands is very useful. This way i can figure out what changed since the course was recorded without having to waste time on google.
2. Try to execute dumpwallet in order to store keys in a file.
./bitcoin-cli -regtest dumpwallet "path and filename"
This worked and stored the file in the desired location.
3. Try to execute dumpprivkey on an address you generated with getnewaddress.
I did this from a fresh regtest. The commands are as follows :
./bitcoind -regtest
-
- Run bitcoind-cli in regtest and create new address.
./bitcoin-cli -regtest getnewaddress
Returns new address. “2N7CmzJhfLkD3bejEkZZgLqNGZv9PJGuXLm
cMb7PBygXHH1zZ”
-
- Print private key to console.
./bitcoin-cli -regtest dumpprivkey 2N7CmzJhfLkD3bejEkZZgLqNGZv9PJGuXLm
cMb7PBygXHH1zZ
Prints private key to the console.
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
Question : I found myself deleting and reinstalling Bitcoin core, because after some tinkering with the commands eventually i get errors for the basics. After some googling, i found that the best way to start a fresh regtest is to delete the data in the “roaming” folder. However, having done this a couple of times. It does not appear to reset everything. Anybody have a tip on how to quickly start fresh when i mess things up?