Skip to content

Commit ede458a

Browse files
use proto4.SectorSize
1 parent 98675b7 commit ede458a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

persist/sqlite/consensus_refactored_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"go.sia.tech/core/consensus"
1212
proto2 "go.sia.tech/core/rhp/v2"
1313
proto3 "go.sia.tech/core/rhp/v3"
14+
proto4 "go.sia.tech/core/rhp/v4"
1415
"go.sia.tech/core/types"
1516
"go.sia.tech/coreutils/chain"
1617
ctestutil "go.sia.tech/coreutils/testutil"
@@ -2299,7 +2300,7 @@ func TestMetrics(t *testing.T) {
22992300
// revise first contract
23002301
fcID := txn1.FileContractID(0)
23012302
fcRevision1 := fc
2302-
fcRevision1.Filesize = proto2.SectorSize
2303+
fcRevision1.Filesize = proto4.SectorSize
23032304
fcRevision1.RevisionNumber++
23042305
txn2 := types.Transaction{
23052306
FileContractRevisions: []types.FileContractRevision{{

persist/sqlite/v2consensus_refactored_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"time"
88

99
"go.sia.tech/core/consensus"
10-
proto2 "go.sia.tech/core/rhp/v2"
1110
proto4 "go.sia.tech/core/rhp/v4"
1211
"go.sia.tech/core/types"
1312
"go.sia.tech/coreutils/chain"
@@ -2425,7 +2424,7 @@ func TestV2Metrics(t *testing.T) {
24252424

24262425
// form two contracts
24272426
fc, payout := prepareV2Contract(renterPK, hostPK, n.tipState().Index.Height+2)
2428-
fc.Capacity = proto2.SectorSize
2427+
fc.Capacity = proto4.SectorSize
24292428
txn1 := types.V2Transaction{
24302429
SiacoinInputs: []types.V2SiacoinInput{{
24312430
Parent: getSCE(t, n.db, n.genesis().Transactions[0].SiacoinOutputID(0)),
@@ -2453,7 +2452,7 @@ func TestV2Metrics(t *testing.T) {
24532452
fcID1 := txn1.V2FileContractID(txn1.ID(), 0)
24542453
fcID2 := txn1.V2FileContractID(txn1.ID(), 1)
24552454
fcRevision1 := fc
2456-
fcRevision1.Filesize = proto2.SectorSize
2455+
fcRevision1.Filesize = proto4.SectorSize
24572456
fcRevision1.RevisionNumber++
24582457
txn2 := types.V2Transaction{
24592458
FileContractRevisions: []types.V2FileContractRevision{{

0 commit comments

Comments
 (0)