forked from ava-labs/avalanchego
-
Notifications
You must be signed in to change notification settings - Fork 4
/
test_tx.go
32 lines (26 loc) · 990 Bytes
/
test_tx.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
32
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package snowstorm
import (
"github.com/MetalBlockchain/metalgo/ids"
"github.com/MetalBlockchain/metalgo/snow/choices"
)
var _ Tx = (*TestTx)(nil)
// TestTx is a useful test tx
type TestTx struct {
choices.TestDecidable
DependenciesV []Tx
DependenciesErrV error
InputIDsV []ids.ID
HasWhitelistV bool
WhitelistV ids.Set
WhitelistErrV error
VerifyV error
BytesV []byte
}
func (t *TestTx) Dependencies() ([]Tx, error) { return t.DependenciesV, t.DependenciesErrV }
func (t *TestTx) InputIDs() []ids.ID { return t.InputIDsV }
func (t *TestTx) HasWhitelist() bool { return t.HasWhitelistV }
func (t *TestTx) Whitelist() (ids.Set, error) { return t.WhitelistV, t.WhitelistErrV }
func (t *TestTx) Verify() error { return t.VerifyV }
func (t *TestTx) Bytes() []byte { return t.BytesV }