Skip to content

Commit 0c3739d

Browse files
fix test
1 parent 05a7734 commit 0c3739d

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/quic-go/quic-go v0.59.0
77
github.com/quic-go/webtransport-go v0.10.0
88
go.etcd.io/bbolt v1.4.3
9-
go.sia.tech/core v0.19.1-0.20260323200052-1bfa3facc408
9+
go.sia.tech/core v0.19.1-0.20260326151920-bbeb92b26458
1010
go.sia.tech/mux v1.5.0
1111
go.uber.org/zap v1.27.1
1212
golang.org/x/crypto v0.49.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu
1414
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
1515
go.etcd.io/bbolt v1.4.3 h1:dEadXpI6G79deX5prL3QRNP6JB8UxVkqo4UPnHaNXJo=
1616
go.etcd.io/bbolt v1.4.3/go.mod h1:tKQlpPaYCVFctUIgFKFnAlvbmB3tpy1vkTnDWohtc0E=
17-
go.sia.tech/core v0.19.1-0.20260323200052-1bfa3facc408 h1:euiK0PJ9ChJCK/moH3mqDuhnZq8Oaz42QB0PLE+HLb8=
18-
go.sia.tech/core v0.19.1-0.20260323200052-1bfa3facc408/go.mod h1:HR5UCFehifHhlOc9DadUVFlMLJYRBtqwXX4UbOX8E14=
17+
go.sia.tech/core v0.19.1-0.20260326151920-bbeb92b26458 h1:bkaQA63PY4G5z8OJXpqnDfazKn5b2SPL/Onbt9MdqSQ=
18+
go.sia.tech/core v0.19.1-0.20260326151920-bbeb92b26458/go.mod h1:VW884XgsHjd9ptg8kkkl9OvHP1QLT/DlMWYjYQFvb88=
1919
go.sia.tech/mux v1.5.0 h1:6bQeO5y4AQPcf+UYHjhxpaNX+2V2wI5LIl0BbAg2YDA=
2020
go.sia.tech/mux v1.5.0/go.mod h1:1/SlgVsLOUsca5tXxAEEwl+Ohm4B8te2YdRhpRGaUZw=
2121
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=

rhp/v4/rpc_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2580,13 +2580,13 @@ func TestMaxSectorBatchSize(t *testing.T) {
25802580

25812581
// append duplicate roots so the contract has over 1 TiB of sectors
25822582
var appendRoots []types.Hash256
2583-
for i := range 2 * proto4.MaxSectorBatchSize {
2583+
for i := range proto4.MaxSectorBatchSize + 1 {
25842584
appendRoots = append(appendRoots, roots[i%len(roots)])
25852585
}
25862586

25872587
_, err = rhp4.RPCAppendSectors(context.Background(), transport, renterKey, cs, settings.Prices, revision, appendRoots)
2588-
if code := proto4.ErrorCode(err); code != proto4.ErrorCodeDecoding {
2589-
t.Fatalf("expected decoding error, got %d", code)
2588+
if code := proto4.ErrorCode(err); code != proto4.ErrorCodeBadRequest {
2589+
t.Fatalf("expected BadRequest error, got %d", code)
25902590
}
25912591

25922592
// append all the sector roots to the contract
@@ -2608,13 +2608,13 @@ func TestMaxSectorBatchSize(t *testing.T) {
26082608
revision.Revision = rootsResp.Revision
26092609

26102610
// try to remove too many indices. They must be unique.
2611-
indices := make([]uint64, len(appendRoots)*10)
2611+
indices := make([]uint64, len(appendRoots)+1)
26122612
for i := range indices {
26132613
indices[i] = uint64(i)
26142614
}
26152615
_, err = rhp4.RPCFreeSectors(context.Background(), transport, renterKey, cs, settings.Prices, revision, indices)
2616-
if code := proto4.ErrorCode(err); code != proto4.ErrorCodeDecoding {
2617-
t.Fatalf("expected decoding error, got %q", err)
2616+
if code := proto4.ErrorCode(err); code != proto4.ErrorCodeBadRequest {
2617+
t.Fatalf("expected BadRequest error, got %q", err)
26182618
}
26192619

26202620
indices = indices[:len(appendRoots)]

0 commit comments

Comments
 (0)