-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 434cb32
Showing
39 changed files
with
31,802 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
*.exe | ||
*.test | ||
*.prof | ||
*.log | ||
*.env | ||
tmp | ||
dist | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
BUILD_DATE = `date +%FT%T%z` | ||
BUILD_USER = $(USER)@`hostname` | ||
VERSION = `git describe --tags` | ||
|
||
# command to build and run on the local OS. | ||
GO_BUILD = go build | ||
|
||
# command to compiling the distributable. Specify GOOS and GOARCH for the target OS. | ||
GO_DIST = CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GO_BUILD) -a -tags netgo -ldflags "-w -X main.buildVersion=$(VERSION) -X main.buildDate=$(BUILD_DATE) -X main.buildUser=$(BUILD_USER)" | ||
|
||
BINARY=bitcoin_reader | ||
|
||
.PHONY: build | ||
|
||
dist: | ||
$(GO_DIST) -o dist/$(BINARY) cmd/node/main.go | ||
|
||
run: | ||
go run cmd/node/main.go | ||
|
||
run-race: | ||
go run -race cmd/node/main.go | ||
|
||
deps: | ||
go get -t ./... | ||
|
||
test: | ||
go test -coverprofile=tmp/coverage.out ./... | ||
|
||
test-race: | ||
go test -race ./... | ||
|
||
test-all: | ||
go clean -testcache | ||
go test ./... | ||
|
||
lint: golint vet goimports | ||
|
||
vet: | ||
ret=0 && test -z "$$(go vet ./... | tee /dev/stderr)" || ret=1 ; exit $$ret | ||
|
||
golint: | ||
ret=0 && test -z "$$(golint . | tee /dev/stderr)" || ret=1 ; exit $$ret | ||
|
||
goimports: | ||
ret=0 && test -z "$$(goimports -l . | tee /dev/stderr)" || ret=1 ; exit $$ret | ||
|
||
tools: | ||
[ -f $(GOPATH)/bin/goimports ] || go get golang.org/x/tools/cmd/goimports | ||
[ -f $(GOPATH)/bin/golint ] || go get github.com/golang/lint/golint | ||
|
||
clean: | ||
rm -rf dist | ||
go clean -testcache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Bitcoin Reader | ||
|
||
Bitcoin reader finds peers in the Bitcoin P2P network and listens to them. It always collects all | ||
headers with valid proof of work. If a tx processor is provided then all txs are run through it as | ||
they are seen on the network. If a block manager is provided then all blocks are fed through it. |
Oops, something went wrong.