Bitcoin Core Advanced Discussion

Sure, mail me, we can see how we can help eachother out, [email protected]

1 Like

Can anyone help me @thecil When I enter the command ā€œgenerate 101ā€ Iā€™m getting an error message. I have gone back over the video several times now and Iā€™m pretty sure Iā€™m doing everything as instructed.

I do have bitcoind regtest running on a separate powershell

2 Likes

Hello sir, yes the command to generate blocks has changed. This is the command that you have to use now:

./bitcoin-cli -regtest generatetoaddress 101 PASTE_ADDRESS_HERE

After that, you should successfully generate 101 blocks.

Hope you find this useful. :slight_smile:

If you have any doubt, please let us know so we can help you!

Carlos Z.

1 Like

I forgot that was in the article under the updated version.Thank u!

1 Like

Hey @thecil , Iā€™m having another issue. I did doublecheck the article to make sure it is not something I should know. So when I enter the command to send 10 coins to an address, i get the error message saying that the 'fee estimation failed. wait a few blocks or enable fallback fee"

I generated more blocks to see if that fixed the issue. It did not. And I tried to enter ā€˜enable -fallbackfeeā€™ as a command and that was an unrecognized command (as i expected).
I really dont mean to be a problem here but could you help me out again? Iā€™m sure itā€™s obvious that I have no programing experience.

2 Likes

You can try to run this command instead. (start bitcoind)
./bitcoind -printtoconsole -regtest -fallbackfee=0.00001

I not 100% sure that it will solve the problem, but at least you can try it.

Hope you find this useful. :slight_smile:

If you have any doubt, please let us know so we can help you!

Carlos Z.

2 Likes

I appreciate it. Itā€™s not working for some reason. Iā€™ll just move on for now as thereā€™s plenty of other material I can study in the academy. thanks

I have the same issueā€¦

2 Likes

Hi @RobertRedBeard and @Amerigo you must start the Bitcoin daemon (bitcoind) with the fallback option:

.\bitcoind.exe -regtest -fallbackfee='0.00001'

After that you will be able to send the coins using the command line bitcoin-cli:

.\bitcoin-cli.exe -regtest sendtoaddress <ADDRESS> 10
9 Likes

thanks so much! is there a way to clear everything iā€™ve done in regtest mode to start fresh?

1 Like

Yes, you can remove the regtest folder in %APPDATA%\Bitcoin on Windows.

2 Likes

I think instead of ā€œbillsā€, shouldnā€™t incoming utxos be equivalent to ā€œreceivablesā€ or ā€œcreditsā€?

What do you mean? You mean the example of spending a bill?
No since you must always spend the entire UTXO, same as you give a waitress the entire bill and get the change back. If you have some kind of credits they are just deducted from the account.
This is how Ethereums account model, but not Bitcoins UTXO model :slight_smile:

2 Likes

thanks man that was a lot of help : )

Hi all,

Currently at the Bitcoin Advance section of the course. I have a question, letā€™s say hypothetically one is writing a Bitcoin script. Can he test his code on both testnet and regtest? Realistically speaking, how do professional blockchain developers test their code? Is it better to use only one source?

lol that username tho

Testing a script function can be done on either of these. Depending on your code one you will want to develop the script first on regtest which is the fastest for you.
After you are comfortable with the result you would move it to the testnet and validate it still works as intended there. After you are satisfied with the results you move to the big boys chain, the mainnet! :smiley:

Sure if you are building a simple script it might be sufficient to only test it on regtest or testnet. However if you are for example also developing some higher level software on top of your script, like a second layer solution, you definitely donā€™t want to skip any of these steps to make absolutely sure your code does what is intended.

1 Like

I get an error code ā€œ-4ā€ referring to Fallbackfee. What is the command to enable fallbackfee on the 0.20 version of bitcoin core?
Thank you.

What type of shell are you using? If youā€™re using powershell, you should put the fee in quotes ( -fallbackfee='0.00001')
The parameter to set fallbackfee is the same on 0.20 (-fallbackfee=0.001). You must set this when starting bitcoind, not with bitcoin-cli.

2 Likes

Thankx. I will try it.