forked from freewil/bitcoin-testnet-box
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (40 loc) · 931 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
BITCOIND=bitcoind
BITCOINGUI=bitcoin-qt
BITCOINCLI=bitcoin-cli
B1_FLAGS=
B2_FLAGS=
B1=-datadir=1 $(B1_FLAGS)
B2=-datadir=2 $(B2_FLAGS)
BLOCKS=1
ADDRESS=
AMOUNT=
ACCOUNT=
start:
$(BITCOIND) $(B1) -daemon
$(BITCOIND) $(B2) -daemon
start-gui:
$(BITCOINGUI) $(B1) &
$(BITCOINGUI) $(B2) &
generate:
$(BITCOINCLI) $(B1) -generate $(BLOCKS)
getinfo:
$(BITCOINCLI) $(B1) -getinfo
$(BITCOINCLI) $(B2) -getinfo
sendfrom1:
$(BITCOINCLI) $(B1) sendtoaddress $(ADDRESS) $(AMOUNT)
sendfrom2:
$(BITCOINCLI) $(B2) sendtoaddress $(ADDRESS) $(AMOUNT)
address1:
$(BITCOINCLI) $(B1) getnewaddress $(ACCOUNT)
address2:
$(BITCOINCLI) $(B2) getnewaddress $(ACCOUNT)
stop:
$(BITCOINCLI) $(B1) stop
$(BITCOINCLI) $(B2) stop
clean:
find 1/regtest/* -not -name 'server.*' -delete
find 2/regtest/* -not -name 'server.*' -delete
docker-build:
docker build --tag bitcoin-testnet-box .
docker-run:
docker run -ti bitcoin-testnet-box