mirror of https://github.com/poanetwork/gecko.git
26 lines
687 B
Go
26 lines
687 B
Go
|
// (c) 2019-2020, Ava Labs, Inc. All rights reserved.
|
||
|
// See the file LICENSE for licensing terms.
|
||
|
|
||
|
package avalanche
|
||
|
|
||
|
import (
|
||
|
"github.com/ava-labs/gecko/ids"
|
||
|
"github.com/ava-labs/gecko/snow/consensus/snowstorm"
|
||
|
"github.com/ava-labs/gecko/snow/engine/common"
|
||
|
)
|
||
|
|
||
|
// DAGVM defines the minimum functionality that an avalanche VM must
|
||
|
// implement
|
||
|
type DAGVM interface {
|
||
|
common.VM
|
||
|
|
||
|
// Return any transactions that have not been sent to consensus yet
|
||
|
PendingTxs() []snowstorm.Tx
|
||
|
|
||
|
// Convert a stream of bytes to a transaction or return an error
|
||
|
ParseTx(tx []byte) (snowstorm.Tx, error)
|
||
|
|
||
|
// Retrieve a transaction that was submitted previously
|
||
|
GetTx(ids.ID) (snowstorm.Tx, error)
|
||
|
}
|