Skip to content

Commit ede1a7e

Browse files
committed
style: consistency fixes
1 parent c1bdcdb commit ede1a7e

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

vms/evm/sync/message/code_request.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/ava-labs/avalanchego/ids"
1414
)
1515

16-
var _ Request = CodeRequest{}
16+
var _ Request = (*CodeRequest)(nil)
1717

1818
// CodeRequest is a request to retrieve a contract code with specified Hash
1919
type CodeRequest struct {

vms/evm/sync/message/leafs_request.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ import (
1212
"github.com/ava-labs/avalanchego/ids"
1313
)
1414

15-
// MaxCodeHashesPerRequest limits the number of code hashes per request to bound
16-
// bandwidth and CPU for verification.
17-
const MaxCodeHashesPerRequest = 5
15+
const (
16+
// MaxCodeHashesPerRequest limits the number of code hashes per request to bound
17+
// bandwidth and CPU for verification.
18+
MaxCodeHashesPerRequest = 5
19+
20+
StateTrieNode = NodeType(1)
21+
StateTrieKeyLength = common.HashLength
22+
)
1823

19-
var _ Request = LeafsRequest{}
24+
var _ Request = (*LeafsRequest)(nil)
2025

2126
// NodeType outlines the trie that a leaf node belongs to
2227
// handlers.LeafsRequestHandler uses this information to determine
2328
// which trie type to fetch the information from
2429
type NodeType uint8
2530

26-
const (
27-
StateTrieNode = NodeType(1)
28-
StateTrieKeyLength = common.HashLength
29-
)
30-
3131
// LeafsRequest is a request to receive trie leaves at specified Root within Start and End byte range
3232
// Limit outlines maximum number of leaves to returns starting at Start
3333
// NodeType outlines which trie to read from state/atomic.

0 commit comments

Comments
 (0)