This commit is contained in:
Thomas E Lackey 2023-07-21 21:38:37 -05:00
parent 21575e2309
commit 265f9545e9

View File

@ -19,9 +19,6 @@ package graphql_test
import (
"context"
"fmt"
"math/big"
"strconv"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core"
@ -36,6 +33,8 @@ import (
"github.com/jmoiron/sqlx"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"math/big"
"strconv"
"github.com/cerc-io/ipld-eth-server/v5/pkg/eth"
"github.com/cerc-io/ipld-eth-server/v5/pkg/eth/test_helpers"
@ -134,11 +133,22 @@ var _ = BeforeSuite(func() {
rcts = receipts[i-1]
}
_, err = builder.BuildStateDiffObject(args, statediff.Params{})
Expect(err).ToNot(HaveOccurred())
tx, err := indexer.PushBlock(block, rcts, mockTD)
Expect(err).ToNot(HaveOccurred())
diff, err := builder.BuildStateDiffObject(args, statediff.Params{})
Expect(err).ToNot(HaveOccurred())
for _, node := range diff.Nodes {
err = indexer.PushStateNode(tx, node, block.Hash().String())
Expect(err).ToNot(HaveOccurred())
}
for _, ipld := range diff.IPLDs {
err = indexer.PushIPLD(tx, ipld)
Expect(err).ToNot(HaveOccurred())
}
err = tx.Submit(err)
Expect(err).ToNot(HaveOccurred())
}