Documentation
¶
Index ¶
- type Conflicts
- func (c *Conflicts) Accept(txID ids.ID)
- func (c *Conflicts) Add(txIntf choices.Decidable) error
- func (c *Conflicts) Conflicts(txIntf choices.Decidable) ([]choices.Decidable, error)
- func (c *Conflicts) IsVirtuous(txIntf choices.Decidable) (bool, error)
- func (c *Conflicts) Updateable() ([]choices.Decidable, []choices.Decidable)
- type TestTx
- type Tx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conflicts ¶
type Conflicts struct {
// contains filtered or unexported fields
}
func (*Conflicts) Accept ¶
Accept notifies this conflict manager that a tx has been conditionally accepted. This means that assuming all the txs this tx depends on are accepted, then this tx should be accepted as well. This
func (*Conflicts) Add ¶
Add this tx to the conflict set. If this tx is of the correct type, this tx will be added to the set of processing txs. It is assumed this tx wasn't already processing. This will mark the consumed utxos and register a rejector that will be notified if a dependency of this tx was rejected.
func (*Conflicts) Conflicts ¶
Conflicts returns the collection of txs that are currently processing that conflict with the provided tx. It is allowed to call with function with txs that aren't yet processing or currently processing txs.
func (*Conflicts) IsVirtuous ¶
IsVirtuous checks the currently processing txs for conflicts. It is allowed to call with function with txs that aren't yet processing or currently processing txs.
type TestTx ¶
type TestTx struct { choices.TestDecidable DependenciesV []Tx InputIDsV []ids.ID VerifyV error BytesV []byte }
TestTx is a useful test tx
func (*TestTx) Dependencies ¶
Dependencies implements the Tx interface
type Tx ¶
type Tx interface { choices.Decidable // Dependencies is a list of transactions upon which this transaction // depends. Each element of Dependencies must be verified before Verify is // called on this transaction. // // Similarly, each element of Dependencies must be accepted before this // transaction is accepted. Dependencies() []Tx // InputIDs is a set where each element is the ID of a piece of state that // will be consumed if this transaction is accepted. // // In the context of a UTXO-based payments system, for example, this would // be the IDs of the UTXOs consumed by this transaction InputIDs() []ids.ID Verify() error Bytes() []byte }
Tx consumes state.