-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
109 lines (83 loc) · 1.84 KB
/
Makefile
File metadata and controls
109 lines (83 loc) · 1.84 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
.PHONY: all test run clean fmt vet
all: test run
# Run all tests
test:
@echo "Running tests..."
go test ./tests/... -v
# Run demo program (default: phase 10)
run:
@echo "Running Milestone 10..."
go run cmd/phase_10/main.go
# Run individual phases
phase1:
@echo "Running Milestone 1..."
go run cmd/phase_1/main.go
phase2:
@echo "Running Milestone 2..."
go run cmd/phase_2/main.go
phase3:
@echo "Running Milestone 3..."
go run cmd/phase_3/main.go
phase4:
@echo "Running Milestone 4..."
go run cmd/phase_4/main.go
phase5:
@echo "Running Milestone 5..."
go run cmd/phase_5/main.go
phase6:
@echo "Running Milestone 6..."
go run cmd/phase_6/main.go
phase7:
@echo "Running Milestone 7..."
go run cmd/phase_7/main.go
phase8:
@echo "Running Milestone 8..."
go run cmd/phase_8/main.go
phase9:
@echo "Running Milestone 9..."
go run cmd/phase_9/main.go
phase10:
@echo "Running Milestone 10..."
go run cmd/phase_10/main.go
phase11:
@echo "Running Milestone 11..."
go run cmd/phase_11/main.go
# Docker commands
docker-build:
@echo "Building Docker image..."
docker build -t bitcoin-node:latest .
docker-up:
@echo "Starting Docker network..."
./scripts/start-testnet.sh
docker-down:
@echo "Stopping Docker network..."
./scripts/stop-testnet.sh
docker-clean:
@echo "Cleaning Docker network..."
./scripts/stop-testnet.sh --clean
docker-logs:
@echo "Showing Docker logs..."
docker-compose logs -f
docker-monitor:
@echo "Monitoring network..."
./scripts/monitor.sh
# Format code
fmt:
go fmt ./...
# Vet code
vet:
go vet ./...
# Clean build artifacts
clean:
go clean
rm -f coverage.out bitcoin-node bitcoin-cli
# Run tests with coverage
coverage:
go test ./tests/... -coverprofile=coverage.out
go tool cover -html=coverage.out
# Check for common mistakes
check: fmt vet test
# Install dependencies
deps:
go mod download
go mod tidy