Documentation ¶
Index ¶
- Constants
- func NewStateReference(referencedStateID iotago.Identifier, stateType mempool.StateType) mempool.StateReference
- func TestAll(t *testing.T, frameworkProvider func(*testing.T) *TestFramework)
- func TestInvalidTransaction(t *testing.T, tf *TestFramework)
- func TestProcessTransaction(t *testing.T, tf *TestFramework)
- func TestProcessTransactionWithReadOnlyInputs(t *testing.T, tf *TestFramework)
- func TestProcessTransactionsOutOfOrder(t *testing.T, tf *TestFramework)
- func TestSetTransactionOrphanage(t *testing.T, tf *TestFramework)
- func TestSetTxOrphanageMultipleAttachments(t *testing.T, tf *TestFramework)
- func TestSpendPropagation(t *testing.T, tf *TestFramework)
- func TestStoreAttachmentInEvictedSlot(t *testing.T, tf *TestFramework)
- type SignedTransaction
- type TestFramework
- func (t *TestFramework) AssertStateDiff(slot iotago.SlotIndex, ...)
- func (t *TestFramework) AttachTransaction(signedTransactionAlias, transactionAlias, blockAlias string, ...) error
- func (t *TestFramework) AttachTransactions(transactionAlias ...string) error
- func (t *TestFramework) BlockID(alias string) iotago.BlockID
- func (t *TestFramework) Cleanup()
- func (t *TestFramework) CommitSlot(slot iotago.SlotIndex)
- func (t *TestFramework) CreateSignedTransaction(transactionAlias string, referencedStates []string, outputCount uint16, ...)
- func (t *TestFramework) CreateTransaction(alias string, referencedStates []string, outputCount uint16, invalid ...bool)
- func (t *TestFramework) InjectState(alias string, state mempool.State)
- func (t *TestFramework) MarkAttachmentIncluded(alias string) bool
- func (t *TestFramework) OutputStateMetadata(alias string) (mempool.StateMetadata, error)
- func (t *TestFramework) RequireAccepted(transactionAliases map[string]bool)
- func (t *TestFramework) RequireAttachmentsEvicted(attachmentAliases map[string]bool)
- func (t *TestFramework) RequireBooked(transactionAliases ...string)
- func (t *TestFramework) RequireInvalid(transactionAliases ...string)
- func (t *TestFramework) RequireSpenderIDs(spendMapping map[string][]string)
- func (t *TestFramework) RequireTransactionsEvicted(transactionAliases map[string]bool)
- func (t *TestFramework) SignedTransactionFromTransaction(signedTransactionAlias string, transactionAlias string)
- func (t *TestFramework) SignedTransactionID(alias string) iotago.SignedTransactionID
- func (t *TestFramework) StateID(alias string) mempool.StateID
- func (t *TestFramework) TransactionID(alias string) iotago.TransactionID
- func (t *TestFramework) TransactionMetadata(alias string) (mempool.TransactionMetadata, bool)
- func (t *TestFramework) TransactionMetadataByAttachment(alias string) (mempool.TransactionMetadata, bool)
- func (t *TestFramework) WaitChildren()
- type Transaction
- type VM
- func (v *VM) Execute(_ context.Context, transaction mempool.Transaction) (outputs []mempool.State, err error)
- func (v *VM) Inputs(transaction mempool.Transaction) ([]mempool.StateReference, error)
- func (v *VM) ValidateSignatures(_ mempool.SignedTransaction, _ []mempool.State) (executionContext context.Context, err error)
Constants ¶
View Source
const (
TestMemoryReleaseMaxMemoryIncreaseFactor = 1.20
)
Variables ¶
This section is empty.
Functions ¶
func NewStateReference ¶
func NewStateReference(referencedStateID iotago.Identifier, stateType mempool.StateType) mempool.StateReference
func TestInvalidTransaction ¶
func TestInvalidTransaction(t *testing.T, tf *TestFramework)
func TestProcessTransaction ¶
func TestProcessTransaction(t *testing.T, tf *TestFramework)
func TestProcessTransactionWithReadOnlyInputs ¶
func TestProcessTransactionWithReadOnlyInputs(t *testing.T, tf *TestFramework)
func TestProcessTransactionsOutOfOrder ¶
func TestProcessTransactionsOutOfOrder(t *testing.T, tf *TestFramework)
func TestSetTransactionOrphanage ¶
func TestSetTransactionOrphanage(t *testing.T, tf *TestFramework)
func TestSetTxOrphanageMultipleAttachments ¶
func TestSetTxOrphanageMultipleAttachments(t *testing.T, tf *TestFramework)
func TestSpendPropagation ¶
func TestSpendPropagation(t *testing.T, tf *TestFramework)
func TestStoreAttachmentInEvictedSlot ¶
func TestStoreAttachmentInEvictedSlot(t *testing.T, tf *TestFramework)
Types ¶
type SignedTransaction ¶
type SignedTransaction struct {
// contains filtered or unexported fields
}
func NewSignedTransaction ¶
func NewSignedTransaction(transaction mempool.Transaction) *SignedTransaction
func (*SignedTransaction) ID ¶
func (s *SignedTransaction) ID() (iotago.SignedTransactionID, error)
func (*SignedTransaction) MustID ¶
func (s *SignedTransaction) MustID() iotago.SignedTransactionID
func (*SignedTransaction) String ¶
func (s *SignedTransaction) String() string
type TestFramework ¶
type TestFramework struct { Instance mempool.MemPool[vote.MockedRank] SpendDAG spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, vote.MockedRank] // contains filtered or unexported fields }
func NewTestFramework ¶
func NewTestFramework(t *testing.T, instance mempool.MemPool[vote.MockedRank], spendDAG spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, vote.MockedRank], ledgerState *ledgertests.MockStateResolver, workers *workerpool.Group) *TestFramework
func (*TestFramework) AssertStateDiff ¶
func (t *TestFramework) AssertStateDiff(slot iotago.SlotIndex, spentOutputAliases, createdOutputAliases, transactionAliases []string)
func (*TestFramework) AttachTransaction ¶
func (t *TestFramework) AttachTransaction(signedTransactionAlias, transactionAlias, blockAlias string, slot iotago.SlotIndex) error
func (*TestFramework) AttachTransactions ¶
func (t *TestFramework) AttachTransactions(transactionAlias ...string) error
func (*TestFramework) Cleanup ¶
func (t *TestFramework) Cleanup()
func (*TestFramework) CommitSlot ¶
func (t *TestFramework) CommitSlot(slot iotago.SlotIndex)
func (*TestFramework) CreateSignedTransaction ¶
func (t *TestFramework) CreateSignedTransaction(transactionAlias string, referencedStates []string, outputCount uint16, invalid ...bool)
func (*TestFramework) CreateTransaction ¶
func (t *TestFramework) CreateTransaction(alias string, referencedStates []string, outputCount uint16, invalid ...bool)
func (*TestFramework) InjectState ¶
func (t *TestFramework) InjectState(alias string, state mempool.State)
func (*TestFramework) MarkAttachmentIncluded ¶
func (t *TestFramework) MarkAttachmentIncluded(alias string) bool
func (*TestFramework) OutputStateMetadata ¶
func (t *TestFramework) OutputStateMetadata(alias string) (mempool.StateMetadata, error)
func (*TestFramework) RequireAccepted ¶
func (t *TestFramework) RequireAccepted(transactionAliases map[string]bool)
func (*TestFramework) RequireAttachmentsEvicted ¶
func (t *TestFramework) RequireAttachmentsEvicted(attachmentAliases map[string]bool)
func (*TestFramework) RequireBooked ¶
func (t *TestFramework) RequireBooked(transactionAliases ...string)
func (*TestFramework) RequireInvalid ¶
func (t *TestFramework) RequireInvalid(transactionAliases ...string)
func (*TestFramework) RequireSpenderIDs ¶
func (t *TestFramework) RequireSpenderIDs(spendMapping map[string][]string)
func (*TestFramework) RequireTransactionsEvicted ¶
func (t *TestFramework) RequireTransactionsEvicted(transactionAliases map[string]bool)
func (*TestFramework) SignedTransactionFromTransaction ¶
func (t *TestFramework) SignedTransactionFromTransaction(signedTransactionAlias string, transactionAlias string)
func (*TestFramework) SignedTransactionID ¶
func (t *TestFramework) SignedTransactionID(alias string) iotago.SignedTransactionID
func (*TestFramework) TransactionID ¶
func (t *TestFramework) TransactionID(alias string) iotago.TransactionID
func (*TestFramework) TransactionMetadata ¶
func (t *TestFramework) TransactionMetadata(alias string) (mempool.TransactionMetadata, bool)
func (*TestFramework) TransactionMetadataByAttachment ¶
func (t *TestFramework) TransactionMetadataByAttachment(alias string) (mempool.TransactionMetadata, bool)
func (*TestFramework) WaitChildren ¶
func (t *TestFramework) WaitChildren()
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func NewTransaction ¶
func NewTransaction(outputCount uint16, inputs ...mempool.StateReference) *Transaction
func (*Transaction) ID ¶
func (t *Transaction) ID() (iotago.TransactionID, error)
func (*Transaction) Inputs ¶
func (t *Transaction) Inputs() ([]mempool.StateReference, error)
func (*Transaction) MustID ¶
func (t *Transaction) MustID() iotago.TransactionID
func (*Transaction) String ¶
func (t *Transaction) String() string
type VM ¶
type VM struct{}
func (*VM) Inputs ¶
func (v *VM) Inputs(transaction mempool.Transaction) ([]mempool.StateReference, error)
func (*VM) ValidateSignatures ¶
Click to show internal directories.
Click to hide internal directories.