Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dagState and GetUTXOFromID #1632

Merged
merged 4 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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