Skip to content

Commit a7dd419

Browse files
author
Jeff Yanta
committed
Bump memory DB record page and sector count to uint16
1 parent 1183038 commit a7dd419

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

pkg/code/data/cvm/ram/account.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ type Record struct {
1515
Address string
1616

1717
Capacity uint16
18-
NumSectors uint8
19-
NumPages uint8
18+
NumSectors uint16
19+
NumPages uint16
2020
PageSize uint8
2121

2222
StoredAccountType cvm.VirtualAccountType

pkg/code/data/cvm/ram/postgres/model.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ type accountModel struct {
2525
Address string `db:"address"`
2626

2727
Capacity uint16 `db:"capacity"`
28-
NumSectors uint8 `db:"num_sectors"`
29-
NumPages uint8 `db:"num_pages"`
28+
NumSectors uint16 `db:"num_sectors"`
29+
NumPages uint16 `db:"num_pages"`
3030
PageSize uint8 `db:"page_size"`
3131

3232
StoredAccountType uint8 `db:"stored_account_type"`

pkg/code/data/cvm/ram/util_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111
func TestGetActualCapcity(t *testing.T) {
1212
for _, tc := range []struct {
1313
capacity uint16
14-
numSectors uint8
15-
numPages uint8
14+
numSectors uint16
15+
numPages uint16
1616
pageSize uint8
1717
expected uint16
1818
}{

0 commit comments

Comments
 (0)