fix flaky test
This commit is contained in:
parent
1137436ac0
commit
2b8e5ad05a
@ -2,7 +2,7 @@
|
||||
|
||||
[![Go Report Card](https://goreportcard.com/badge/github.com/vulcanize/ipfs-blockchain-watcher)](https://goreportcard.com/report/github.com/vulcanize/ipfs-blockchain-watcher)
|
||||
|
||||
> ipfs-blockchain-watcher is used to extract, transform, and load all eth or btc data into an IPFS-backing Postgres datastore while generating useful secondary indexes around that data in other Postgres tables
|
||||
> ipfs-blockchain-watcher is used to extract, transform, and load all eth or btc data into an IPFS-backing Postgres datastore while generating useful secondary indexes around the data in other Postgres tables
|
||||
|
||||
## Table of Contents
|
||||
1. [Background](#background)
|
||||
@ -102,7 +102,7 @@ Warning: There is a good chance even a fully synced archive node has incomplete
|
||||
|
||||
The output from geth should mention that it is `Starting statediff service` and block synchronization should begin shortly thereafter.
|
||||
Note that until it receives a subscriber, the statediffing process does nothing but wait for one. Once a subscription is received, this
|
||||
will be indicated in the output and node will begin processing and sending statediffs.
|
||||
will be indicated in the output and the node will begin processing and sending statediffs.
|
||||
|
||||
Also in the output will be the endpoints that will be used to interface with the node.
|
||||
The default ws url is "127.0.0.1:8546" and the default http url is "127.0.0.1:8545".
|
||||
|
@ -47,7 +47,7 @@ var (
|
||||
BlockNumber = big.NewInt(1)
|
||||
MockHeader = types.Header{
|
||||
Time: 0,
|
||||
Number: BlockNumber,
|
||||
Number: new(big.Int).Set(BlockNumber),
|
||||
Root: common.HexToHash("0x0"),
|
||||
TxHash: common.HexToHash("0x0"),
|
||||
ReceiptHash: common.HexToHash("0x0"),
|
||||
@ -298,7 +298,7 @@ var (
|
||||
}
|
||||
|
||||
MockStateDiff = statediff.StateObject{
|
||||
BlockNumber: BlockNumber,
|
||||
BlockNumber: new(big.Int).Set(BlockNumber),
|
||||
BlockHash: MockBlock.Hash(),
|
||||
Nodes: StateDiffs,
|
||||
}
|
||||
@ -414,7 +414,7 @@ var (
|
||||
}
|
||||
|
||||
MockCIDWrapper = ð.CIDWrapper{
|
||||
BlockNumber: big.NewInt(1),
|
||||
BlockNumber: new(big.Int).Set(BlockNumber),
|
||||
Header: eth.HeaderModel{
|
||||
BlockNumber: "1",
|
||||
BlockHash: MockBlock.Hash().String(),
|
||||
@ -459,7 +459,7 @@ var (
|
||||
StorageIPLD, _ = blocks.NewBlockWithCid(StorageLeafNode, StorageCID)
|
||||
|
||||
MockIPLDs = eth.IPLDs{
|
||||
BlockNumber: big.NewInt(1),
|
||||
BlockNumber: new(big.Int).Set(BlockNumber),
|
||||
Header: ipfs.BlockModel{
|
||||
Data: HeaderIPLD.RawData(),
|
||||
CID: HeaderIPLD.Cid().String(),
|
||||
@ -533,7 +533,7 @@ func createTransactionsAndReceipts() (types.Transactions, types.Receipts, common
|
||||
trx1 := types.NewTransaction(0, Address, big.NewInt(1000), 50, big.NewInt(100), []byte{})
|
||||
trx2 := types.NewTransaction(1, AnotherAddress, big.NewInt(2000), 100, big.NewInt(200), []byte{})
|
||||
trx3 := types.NewContractCreation(2, big.NewInt(1500), 75, big.NewInt(150), []byte{0, 1, 2, 3, 4, 5})
|
||||
transactionSigner := types.MakeSigner(params.MainnetChainConfig, BlockNumber)
|
||||
transactionSigner := types.MakeSigner(params.MainnetChainConfig, new(big.Int).Set(BlockNumber))
|
||||
mockCurve := elliptic.P256()
|
||||
mockPrvKey, err := ecdsa.GenerateKey(mockCurve, rand.Reader)
|
||||
if err != nil {
|
||||
|
@ -34,7 +34,7 @@ func init() {
|
||||
func setTestConfig() {
|
||||
vip := viper.New()
|
||||
vip.SetConfigName("testing")
|
||||
vip.AddConfigPath("$GOPATH/src/github.com/vulcanize/vulcanizedb/environments/")
|
||||
vip.AddConfigPath("$GOPATH/src/github.com/vulcanize/ipfs-blockchain-watcher/environments/")
|
||||
if err := vip.ReadInConfig(); err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user