Author

Topic: how to set a fixed coinbase address (Read 276 times)

legendary
Activity: 2254
Merit: 2253
From Zero to 2 times Self-Made Legendary
March 28, 2019, 09:09:56 AM
#3
bitcoincore version: v0.17.1
OS: ubuntu18.04

what I'm doing is testing with bitcoincore regtest mode, I find everytime it mine a block (bitcoin-cli -regtest generate 1), it will generate a new address to receive 50btc reward,
I'm wondering can I reuse the existing address to receive the reward.
I know it's not good to reuse btc address, but for simplicity in local testing, is there anyway to set a fixed coinbase address?
thanks

You can mine the block to your specified address by using bitcoin-cli -regtest generatetoaddress n "your_address"

n = the total blocks will generate.
legendary
Activity: 2730
Merit: 7065
March 12, 2019, 06:17:11 AM
#2
I tried to find the answer you are looking for in the source below but with no luck. Maybe you or another user can find it or know what you need to do to use the same address, if it is possible.
https://bitcoin.org/en/developer-examples#regtest-mode
newbie
Activity: 5
Merit: 3
March 12, 2019, 04:45:23 AM
#1
bitcoincore version: v0.17.1
OS: ubuntu18.04

what I'm doing is testing with bitcoincore regtest mode, I find everytime it mine a block (bitcoin-cli -regtest generate 1), it will generate a new address to receive 50btc reward,
I'm wondering can I reuse the existing address to receive the reward.
I know it's not good to reuse btc address, but for simplicity in local testing, is there anyway to set a fixed coinbase address?
thanks
Jump to: