-
Notifications
You must be signed in to change notification settings - Fork 669
/
vertex.go
31 lines (24 loc) · 934 Bytes
/
vertex.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package avalanche
import (
"github.com/ava-labs/avalanchego/snow/choices"
"github.com/ava-labs/avalanchego/snow/consensus/snowstorm"
"github.com/ava-labs/avalanchego/vms/components/verify"
)
// Vertex is a collection of multiple transactions tied to other vertices
type Vertex interface {
choices.Decidable
// Vertex verification should be performed before issuance.
verify.Verifiable
snowstorm.Whitelister
// Returns the vertices this vertex depends on
Parents() ([]Vertex, error)
// Returns the height of this vertex. A vertex's height is defined by one
// greater than the maximum height of the parents.
Height() (uint64, error)
// Returns a series of state transitions to be performed on acceptance
Txs() ([]snowstorm.Tx, error)
// Returns the binary representation of this vertex
Bytes() []byte
}