Bitcoin Forum
September 12, 2025, 06:09:23 AM *
News: Latest Bitcoin Core release: 29.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How can I mine transactions in regtest mode?  (Read 135 times)
BlackHatCoiner (OP)
Legendary
*
Offline Offline

Activity: 1792
Merit: 8695


View Profile
July 14, 2020, 06:49:00 PM
 #1

I can mine as many blocks as I want. The problem is that when I make a transaction it remains unconfirmed, because I haven't found any way to add transactions to a block.
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3780
Merit: 7291


Just writing some code


View Profile WWW
July 14, 2020, 10:10:38 PM
 #2

How are you mining blocks?

If you use the generatetoaddress RPC, it will add transactions to blocks for you.

nc50lc
Legendary
*
Offline Offline

Activity: 2898
Merit: 7573


Self-proclaimed Genius


View Profile
July 15, 2020, 01:45:28 AM
 #3

I can mine as many blocks as I want. The problem is that when I make a transaction it remains unconfirmed, because I haven't found any way to add transactions to a block.
Most of the time (based on my experience), your transactions through the GUI wont be broadcast to your own mempool.
That said, you need to use sendrawtransaction "RAW_TX" first before using generatetoaddress.

To get the RAW transaction in Qt, you can right click the transaction in the "Transactions" tab and select "Copy raw transaction".

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!