Skip to content

Commit de56e63

Browse files
committed
Merge remote-tracking branch 'upstream/master' into pr-190
2 parents 3bf30b0 + 07ebec3 commit de56e63

File tree

23 files changed

+174
-68
lines changed

23 files changed

+174
-68
lines changed

.github/workflows/sonar.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
args: --timeout=5m --issues-exit-code=0 --output.checkstyle.path=golangci-lint-report.xml
4848

4949
- name: SonarCloud Scan
50-
uses: SonarSource/sonarqube-scan-action@v5.0.0
50+
uses: SonarSource/sonarqube-scan-action@v5.2.0
5151
env:
5252
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5353
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.golangci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ linters:
55
rules:
66
- linters:
77
- staticcheck
8-
text: "SA1019:"
8+
text: "SA1019:"
9+
- linters:
10+
- errcheck
11+
text: "Error return value of `.*\\.Close` is not checked"

CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ All notable changes to this project will be documented in this file. The format
44

55
## Table of Contents
66

7-
- [1.2.2 - 2025-06-30](#122---2025-06-30)
7+
- [1.2.3 - 2025-06-30](#123---2025-06-30)
8+
- [1.2.2 - 2025-06-27](#122---2025-06-27)
89
- [1.2.1 - 2025-06-12](#121---2025-06-12)
910
- [1.2.0 - 2025-06-10](#120---2025-06-10)
1011
- [1.1.27 - 2025-05-15](#1127---2025-05-15)
@@ -37,7 +38,7 @@ All notable changes to this project will be documented in this file. The format
3738
- [1.1.0 - 2024-08-19](#110---2024-08-19)
3839
- [1.0.0 - 2024-06-06](#100---2024-06-06)
3940

40-
## [1.2.2] - 2025-06-30
41+
## [1.2.3] - 2025-06-30
4142

4243
### Fixed
4344
- Fixed an encoding bug in peer authentication
@@ -46,6 +47,12 @@ All notable changes to this project will be documented in this file. The format
4647
- Improved error handling consistency using `NewAuthError`
4748
- Fixed variable naming consistency
4849

50+
## [1.2.2] - 2025-06-27
51+
### Added
52+
- New `CurrentHeight` function on chaintracker interface
53+
54+
### Fixed
55+
- Update type `wallet.Action.Satoshis` from `uint64` to `int64`
4956

5057
## [1.2.1] - 2025-06-12
5158

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
Welcome to the BSV Blockchain Libraries Project, the comprehensive Go SDK designed to provide an updated and unified layer for developing scalable applications on the BSV Blockchain. This SDK addresses the limitations of previous tools by offering a fresh, peer-to-peer approach, adhering to SPV, and ensuring privacy and scalability.
44

55
# Status
6-
![golangci-lint](https://github.com/bsv-blockchain/go-sdk/workflows/golangci-lint/badge.svg)
6+
[![CodeQL](https://github.com/bsv-blockchain/go-sdk/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/bsv-blockchain/go-sdk/actions/workflows/github-code-scanning/codeql)
7+
[![Dependabot Updates](https://github.com/bsv-blockchain/go-sdk/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/bsv-blockchain/go-sdk/actions/workflows/dependabot/dependabot-updates)
8+
[![golangci-lint](https://github.com/bsv-blockchain/go-sdk/actions/workflows/golangci-lint.yaml/badge.svg)](https://github.com/bsv-blockchain/go-sdk/actions/workflows/golangci-lint.yaml)
9+
[![pages-build-deployment](https://github.com/bsv-blockchain/go-sdk/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/bsv-blockchain/go-sdk/actions/workflows/pages/pages-build-deployment)
10+
[![sonarcloud-analysis](https://github.com/bsv-blockchain/go-sdk/actions/workflows/sonar.yaml/badge.svg)](https://github.com/bsv-blockchain/go-sdk/actions/workflows/sonar.yaml)
711

812
## Table of Contents
913

auth/transports/simplified_http_transport.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func (t *SimplifiedHTTPTransport) Send(ctx context.Context, message *auth.AuthMe
6666
if err != nil {
6767
return fmt.Errorf("failed to perform proxied HTTP request: %w", err)
6868
}
69-
defer func() { _ = resp.Body.Close() }()
69+
defer resp.Body.Close()
7070

7171
// Step 3: Serialize the response as an AuthMessage and notify handlers
7272
respPayloadWriter := util.NewWriter()
@@ -114,7 +114,7 @@ func (t *SimplifiedHTTPTransport) Send(ctx context.Context, message *auth.AuthMe
114114
if err != nil {
115115
return fmt.Errorf("failed to send HTTP request: %w", err)
116116
}
117-
defer func() { _ = resp.Body.Close() }()
117+
defer resp.Body.Close()
118118

119119
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
120120
body, _ := io.ReadAll(resp.Body)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require (
99
golang.org/x/sync v0.15.0
1010
)
1111

12-
require golang.org/x/net v0.39.0
12+
require golang.org/x/net v0.41.0
1313

1414
require (
1515
github.com/pkg/errors v0.9.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT
88
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
99
golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM=
1010
golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U=
11-
golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY=
12-
golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E=
11+
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
12+
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
1313
golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8=
1414
golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
1515
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=

overlay/lookup/facilitator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func (f *HTTPSOverlayLookupFacilitator) Lookup(ctx context.Context, url string,
3434
if err != nil {
3535
return nil, err
3636
}
37-
defer func() { _ = resp.Body.Close() }()
37+
defer resp.Body.Close()
3838
if resp.StatusCode != http.StatusOK {
3939
return nil, &util.HTTPError{
4040
StatusCode: resp.StatusCode,

overlay/topic/facilitator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (f *HTTPSOverlayBroadcastFacilitator) Send(url string, taggedBEEF *overlay.
4242
if err != nil {
4343
return nil, err
4444
}
45-
defer func() { _ = resp.Body.Close() }()
45+
defer resp.Body.Close()
4646
if resp.StatusCode != http.StatusOK {
4747
return nil, &util.HTTPError{
4848
StatusCode: resp.StatusCode,

spv/scripts_only.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
package spv
22

3-
import "github.com/bsv-blockchain/go-sdk/chainhash"
3+
import (
4+
"context"
5+
6+
"github.com/bsv-blockchain/go-sdk/chainhash"
7+
)
48

59
type GullibleHeadersClient struct{}
610

711
func (g *GullibleHeadersClient) IsValidRootForHeight(merkleRoot *chainhash.Hash, height uint32) (bool, error) {
812
// DO NOT USE IN A REAL PROJECT due to security risks of accepting any merkle root as valid without verification
913
return true, nil
1014
}
15+
16+
func (g *GullibleHeadersClient) CurrentHeight(ctx context.Context) (uint32, error) {
17+
return 800000, nil // Return a dummy height for testing
18+
}

0 commit comments

Comments
 (0)