From 4f1cb3ed524b2f48c1a169ceb37b5eba002452c9 Mon Sep 17 00:00:00 2001 From: Bruno Volpato Date: Tue, 12 Dec 2017 13:54:29 -0800 Subject: [PATCH] Add example of sendtoaddress + confirm the tx --- 15_2_Testing_with_Regtest.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/15_2_Testing_with_Regtest.md b/15_2_Testing_with_Regtest.md index 42bc637..9050efb 100644 --- a/15_2_Testing_with_Regtest.md +++ b/15_2_Testing_with_Regtest.md @@ -16,3 +16,13 @@ $ bitcoin-cli -regtest getbalance Now you should be able to use this balance for any type of interaction with the private Blockchain, such as sending Bitcoin transactions according to [Chapter 4]((04_0_Sending_Bitcoin_Transactions.md)) in this guide. The only difference is that you need to use the flag `-regtest` when running the `bitcoin-cli` in order for the request to be sent to the Regtest Bitcoin daemon. It is important to note that for your transactions to complete, you will have to generate/mine new blocks so that the transactions can be included into them. + +For example, to create a transaction and include into a block: +``` +$ bitcoin-cli -regtest sendtoaddress [address] 10.0 +``` + +And after it, if your application requires 6 confirmations, you can mine additional 6 blocks into your Regtest chain: +``` +$ bitcoin-cli -regtest generate 6 +```