mirror of
https://github.com/btcsuite/btcd.git
synced 2025-02-22 22:25:45 +01:00
commit
dc022aa276
4 changed files with 6 additions and 35 deletions
12
.github/workflows/go.yml
vendored
12
.github/workflows/go.yml
vendored
|
@ -14,19 +14,7 @@ jobs:
|
||||||
go-version: ${{ matrix.go }}
|
go-version: ${{ matrix.go }}
|
||||||
- name: Check out source
|
- name: Check out source
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Install Linters
|
|
||||||
run: "curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.26.0"
|
|
||||||
- name: Build
|
- name: Build
|
||||||
env:
|
env:
|
||||||
GO111MODULE: "on"
|
GO111MODULE: "on"
|
||||||
run: go build ./...
|
run: go build ./...
|
||||||
- name: Test
|
|
||||||
env:
|
|
||||||
GO111MODULE: "on"
|
|
||||||
run: |
|
|
||||||
sh ./goclean.sh
|
|
||||||
|
|
||||||
- name: Send coverage
|
|
||||||
uses: shogo82148/actions-goveralls@v1
|
|
||||||
with:
|
|
||||||
path-to-profile: profile.cov
|
|
||||||
|
|
19
goclean.sh
19
goclean.sh
|
@ -1,19 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# The script does automatic checking on a Go package and its sub-packages, including:
|
|
||||||
# 1. gofmt (http://golang.org/cmd/gofmt/)
|
|
||||||
# 3. go vet (http://golang.org/cmd/vet)
|
|
||||||
# 4. gosimple (https://github.com/dominikh/go-simple)
|
|
||||||
# 5. unconvert (https://github.com/mdempsky/unconvert)
|
|
||||||
# 6. race detector (http://blog.golang.org/race-detector)
|
|
||||||
# 7. test coverage (http://blog.golang.org/cover)
|
|
||||||
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
env GORACE="halt_on_error=1" go test -race -tags="rpctest" -covermode atomic -coverprofile=profile.cov ./...
|
|
||||||
|
|
||||||
# Automatic checks
|
|
||||||
golangci-lint run --deadline=10m --disable-all \
|
|
||||||
--enable=gofmt \
|
|
||||||
--enable=vet \
|
|
||||||
--enable=gosimple \
|
|
||||||
--enable=unconvert
|
|
|
@ -18,7 +18,7 @@ const semanticAlphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqr
|
||||||
const (
|
const (
|
||||||
appMajor uint = 0
|
appMajor uint = 0
|
||||||
appMinor uint = 22
|
appMinor uint = 22
|
||||||
appPatch uint = 2
|
appPatch uint = 3
|
||||||
|
|
||||||
// appPreRelease MUST only contain characters from semanticAlphabet
|
// appPreRelease MUST only contain characters from semanticAlphabet
|
||||||
// per the semantic versioning spec.
|
// per the semantic versioning spec.
|
||||||
|
|
|
@ -96,11 +96,13 @@ const (
|
||||||
|
|
||||||
// maxWitnessItemsPerInput is the maximum number of witness items to
|
// maxWitnessItemsPerInput is the maximum number of witness items to
|
||||||
// be read for the witness data for a single TxIn. This number is
|
// be read for the witness data for a single TxIn. This number is
|
||||||
// derived using a possble lower bound for the encoding of a witness
|
// derived using a possible lower bound for the encoding of a witness
|
||||||
// item: 1 byte for length + 1 byte for the witness item itself, or two
|
// item: 1 byte for length + 1 byte for the witness item itself, or two
|
||||||
// bytes. This value is then divided by the currently allowed maximum
|
// bytes. This value is then divided by the currently allowed maximum
|
||||||
// "cost" for a transaction.
|
// "cost" for a transaction. We use this for an upper bound for the
|
||||||
maxWitnessItemsPerInput = 500000
|
// buffer and consensus makes sure that the weight of a transaction
|
||||||
|
// cannot be more than 4000000.
|
||||||
|
maxWitnessItemsPerInput = 4_000_000
|
||||||
|
|
||||||
// maxWitnessItemSize is the maximum allowed size for an item within
|
// maxWitnessItemSize is the maximum allowed size for an item within
|
||||||
// an input's witness data. This value is bounded by the largest
|
// an input's witness data. This value is bounded by the largest
|
||||||
|
|
Loading…
Add table
Reference in a new issue