forked from cerc-io/ipld-eth-server
Add light sync command
- Only syncs block headers (excludes block bodies, transactions, receipts, and logs) - Modifies validation window to include the most recent block - Isolates validation window to the variable defined in the cmd directory (blocks have a separate variable defined in the block_repository for determining when to set a block as final)
This commit is contained in:
@@ -28,7 +28,7 @@ var _ = Describe("ERC20 Fetcher", func() {
|
||||
blockNumber := int64(5502914)
|
||||
|
||||
infuraIPC := "https://mainnet.infura.io/J5Vd2fRtGsw0zZ0Ov3BL"
|
||||
realBlockchain := geth.NewBlockchain(infuraIPC)
|
||||
realBlockchain := geth.NewBlockChain(infuraIPC)
|
||||
realFetcher := every_block.NewFetcher(realBlockchain)
|
||||
|
||||
fakeBlockchain := &mocks.Blockchain{}
|
||||
|
||||
@@ -58,7 +58,7 @@ var _ = Describe("Everyblock transformers", func() {
|
||||
})
|
||||
|
||||
It("creates a token_supply record for each block in the given range", func() {
|
||||
initializer := every_block.TokenSupplyTransformerInitializer{erc20_watcher.DaiConfig}
|
||||
initializer := every_block.TokenSupplyTransformerInitializer{Config: erc20_watcher.DaiConfig}
|
||||
transformer := initializer.NewTokenSupplyTransformer(db, &blockchain)
|
||||
transformer.Execute()
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
package every_block
|
||||
|
||||
import (
|
||||
"github.com/vulcanize/vulcanizedb/libraries/shared"
|
||||
"github.com/vulcanize/vulcanizedb/examples/erc20_watcher"
|
||||
"github.com/vulcanize/vulcanizedb/libraries/shared"
|
||||
)
|
||||
|
||||
func TransformerInitializers() []shared.TransformerInitializer {
|
||||
|
||||
Reference in New Issue
Block a user