is there a way to run bitcoin-qt and point it to a local testnet?

3

1

I'm running a small testnet locally with this project:

http://github.com/freewil/bitcoin-testnet-box

but I'm having trouble pointing bitcoin-qt to the blockchain that I created locally myself, so I have some data like this:

bitcoin-cli -datadir=1  getinfo
{    
    "version" : 90300,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 0,
    "timeoffset" : 0,
    "connections" : 1,
    "proxy" : "",
    "difficulty" : 0.00000000,
    "testnet" : false,
    "keypoololdest" : 1413617762,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "relayfee" : 0.00001000,
    "errors" : ""
}
bitcoin-cli -datadir=2  getinfo
{
    "version" : 90300,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 0,
    "timeoffset" : 0,
    "connections" : 1,
    "proxy" : "",
    "difficulty" : 0.00000000,
    "testnet" : false,
    "keypoololdest" : 1413617762,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "relayfee" : 0.00001000,
    "errors" : ""
}

and I want that to be the data, and the addresses that is picked up and incorporated by bitcoin-qt. I guess there should be some flags to facilitate this but everything I've tried so far always in unsuccessful- maybe someone on here knows or has some idea?

smatthewenglish

Posted 2016-06-30T16:36:38.273

Reputation: 1 063

Answers

1

Looking at the Makefile

start: $(BITCOIND) $(B1) -daemon $(BITCOIND) $(B2) -daemon

start-gui: $(BITCOINGUI) $(B1) & $(BITCOINGUI) $(B2) &

so probably make start-gui will work for you

carvmarc

Posted 2016-06-30T16:36:38.273

Reputation: 126

1

Use the -testnet option. This will run the daemon in testnet.

Jimmy Song

Posted 2016-06-30T16:36:38.273

Reputation: 7 067

1I think that will run it for the global testnet- isn't that right? I want to just run it on my own local testnet- I think it's differentsmatthewenglish 2016-07-01T08:56:46.597

They're the same thing. The way testnet-in-a-box prevents connecting to the global testnet is by connecting only to each other. Essentially, your daemon thinks you have the longest chain because it doesn't see the global testnet.Jimmy Song 2016-07-01T18:59:54.643