Skip to content

Commit

Permalink
Remove dagState and GetUTXOFromID (ava-labs#1632)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph authored Jun 21, 2023
1 parent 94302bc commit 0073875
Show file tree
Hide file tree
Showing 12 changed files with 101 additions and 417 deletions.
84 changes: 0 additions & 84 deletions vms/avm/dag_state.go

This file was deleted.

8 changes: 4 additions & 4 deletions vms/avm/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func TestIndexTransaction_Ordered(t *testing.T) {

var inputUTXOs []*avax.UTXO
for _, utxoID := range uniqueParsedTX.InputUTXOs() {
utxo, err := vm.dagState.GetUTXOFromID(utxoID)
utxo, err := vm.state.GetUTXO(utxoID.InputID())
require.NoError(err)

inputUTXOs = append(inputUTXOs, utxo)
Expand Down Expand Up @@ -170,7 +170,7 @@ func TestIndexTransaction_MultipleTransactions(t *testing.T) {

var inputUTXOs []*avax.UTXO
for _, utxoID := range uniqueParsedTX.InputUTXOs() {
utxo, err := vm.dagState.GetUTXOFromID(utxoID)
utxo, err := vm.state.GetUTXO(utxoID.InputID())
require.NoError(err)

inputUTXOs = append(inputUTXOs, utxo)
Expand Down Expand Up @@ -235,7 +235,7 @@ func TestIndexTransaction_MultipleAddresses(t *testing.T) {

var inputUTXOs []*avax.UTXO //nolint:prealloc
for _, utxoID := range tx.Unsigned.InputUTXOs() {
utxo, err := vm.dagState.GetUTXOFromID(utxoID)
utxo, err := vm.state.GetUTXO(utxoID.InputID())
require.NoError(err)

inputUTXOs = append(inputUTXOs, utxo)
Expand Down Expand Up @@ -303,7 +303,7 @@ func TestIndexTransaction_UnorderedWrites(t *testing.T) {

var inputUTXOs []*avax.UTXO
for _, utxoID := range uniqueParsedTX.InputUTXOs() {
utxo, err := vm.dagState.GetUTXOFromID(utxoID)
utxo, err := vm.state.GetUTXO(utxoID.InputID())
require.NoError(err)

inputUTXOs = append(inputUTXOs, utxo)
Expand Down
Loading

0 comments on commit 0073875

Please sign in to comment.