cache misses trigger call out to statediffing geth to fill in the gap in Postgres

This commit is contained in:
Ian Norden
2021-02-24 10:50:26 -06:00
parent 7df5bbc99a
commit 211ec12009
16 changed files with 151 additions and 27 deletions
+4 -3
View File
@@ -19,10 +19,11 @@ package eth_test
import (
"bytes"
"context"
"github.com/vulcanize/ipld-eth-indexer/pkg/shared"
"io/ioutil"
"math/big"
"github.com/vulcanize/ipld-eth-indexer/pkg/shared"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
@@ -83,7 +84,7 @@ var _ = Describe("eth state reading tests", func() {
RPCGasCap: big.NewInt(10000000000),
})
Expect(err).ToNot(HaveOccurred())
api = eth.NewPublicEthAPI(backend, nil)
api = eth.NewPublicEthAPI(backend, nil, false)
// make the test blockchain (and state)
blocks, receipts, chain = test_helpers.MakeChain(5, test_helpers.Genesis, test_helpers.TestChainGen)
@@ -153,7 +154,7 @@ var _ = Describe("eth state reading tests", func() {
// Insert some non-canonical data into the database so that we test our ability to discern canonicity
indexAndPublisher := eth2.NewIPLDPublisher(db)
api = eth.NewPublicEthAPI(backend, nil)
api = eth.NewPublicEthAPI(backend, nil, false)
err = indexAndPublisher.Publish(test_helpers.MockConvertedPayload)
Expect(err).ToNot(HaveOccurred())
// The non-canonical header has a child