<p>Solved it!</p>

<p>I downloaded the bitcoin core source code,
changed the regtest node address parameters to be like the mainnet in the file src/chainparams.cpp.</p>

<p>Then compiled it, run the node on regtest and it worked like magic!</p>

CC BY-SA 4.0
2020-05-12T22:21:02.723Z
2020-05-12T22:21:02.723Z
Danny Cohen
<p>I am trying to run a private Bitcoin network for testing.
I tried to run a RegTest network, but I need the addresses to be in the format of the ainnet.
Can I configure the RegTest to run with Mainnet addresses?</p>

<p>Thanks!</p>

CC BY-SA 4.0
2020-04-27T13:43:40.617Z
Why do you "need" to do this? Mixing up addresses from different networks is a really bad idea. They have distinct formatting for a reason.
pinhead
CC BY-SA 4.0
2020-04-27T15:16:14.070Z
I want to test a product that is interaction with the node.
I have no way to change the code of this product, so I cant make it work with the testnet addresses.
And I prefer not to spent hundreds of dollars on tests and fees :(
Danny Cohen
CC BY-SA 4.0
2020-04-27T15:22:36.697Z
Well I suppose you could run bitcoin in mainnet mode, but prevent it from actually finding any peers except local nodes you control. You should be able to generate blocks at the low difficulty of the genesis block and send transactions. You would need to be responsible for the keys and addresses you use and make absolutely certain that no one loses any real money.
pinhead
CC BY-SA 4.0
2020-04-27T16:15:38.840Z
Are you getting addresses from Core or using Core RPCs that take addresses (e.g. sendtoaddress)?
Ava Chow
CC BY-SA 4.0
2020-04-27T16:53:45.733Z
I am using the Core RPC only. I am not using the built in wallet
Danny Cohen
CC BY-SA 4.0
2020-04-27T17:11:29.453Z
Tried to create a mainnet node and mine the first block. But by my computations, in my PC it will take me about 8 hours to mine each block.
Which is not ideal
Danny Cohen
<address><regtest>
RegTest with mainnet addresses
Danny Cohen
# RegTest with mainnet addresses

(Asked by: username_0 on 2020-04-27)

I am trying to run a private Bitcoin network for testing.
I tried to run a RegTest network, but I need the addresses to be in the format of the ainnet.
Can I configure the RegTest to run with Mainnet addresses?

Thanks!

**Tags:** address, regtest

> **Comments:**
> **username_1**: Why do you "need" to do this? Mixing up addresses from different networks is a really bad idea. They have distinct formatting for a reason.  
> **username_0**: I want to test a product that is interaction with the node. I have no way to change the code of this product, so I cant make it work with the testnet addresses. And I prefer not to spent hundreds of dollars on tests and fees :(  
> **username_1**: Well I suppose you could run bitcoin in mainnet mode, but prevent it from actually finding any peers except local nodes you control. You should be able to generate blocks at the low difficulty of the genesis block and send transactions. You would need to be responsible for the keys and addresses you use and make absolutely certain that no one loses any real money.  
> **username_2**: Are you getting addresses from Core or using Core RPCs that take addresses (e.g. sendtoaddress)?  
> **username_0**: I am using the Core RPC only. I am not using the built in wallet  
> **username_0**: Tried to create a mainnet node and mine the first block. But by my computations, in my PC it will take me about 8 hours to mine each block. Which is not ideal  

---

## 1 answers

### Answer by username_0 on 2020-05-12. Score: 2 | Accepted answer

Solved it!

I downloaded the bitcoin core source code,
changed the regtest node address parameters to be like the mainnet in the file src/chainparams.cpp.

Then compiled it, run the node on regtest and it worked like magic!


---

