Skip to content

Commit

Permalink
Refactor: reverted more code
Browse files Browse the repository at this point in the history
  • Loading branch information
hmoog committed Oct 3, 2023
1 parent 43bb5b4 commit 21168a4
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions pkg/protocol/engine/mempool/tests/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (s *SignedTransaction) String() string {

type Transaction struct {
id iotago.TransactionID
utxoInputs []iotago.Input
inputs []mempool.StateReference
outputCount uint16
invalidTransaction bool
}
Expand All @@ -36,7 +36,7 @@ func NewSignedTransaction(transaction mempool.Transaction) *SignedTransaction {
func NewTransaction(outputCount uint16, inputs ...mempool.StateReference) *Transaction {
return &Transaction{
id: tpkg.RandTransactionID(),
utxoInputs: inputs,
inputs: inputs,
outputCount: outputCount,
}
}
Expand All @@ -46,15 +46,7 @@ func (t *Transaction) ID() (iotago.TransactionID, error) {
}

func (t *Transaction) Inputs() ([]mempool.StateReference, error) {
return append(t.utxoInputs, t.contextInputs...), nil
}

func (t *Transaction) UTXOInputs() ([]iotago.Input, error) {
return t.utxoInputs, nil
}

func (t *Transaction) ContextInputs() ([]iotago.Input, error) {
return t.contextInputs, nil
return t.inputs, nil
}

func (t *Transaction) String() string {
Expand Down

0 comments on commit 21168a4

Please sign in to comment.