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

Feature/configurable reorg size #23

Merged
merged 3 commits into from
Apr 20, 2021
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
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
export GOARCH=amd64
wget https://golang.org/dl/go1.15.5.linux-amd64.tar.gz
tar -xzvf go1.15.5.linux-amd64.tar.gz
go/bin/go build ./cmd/geth -o geth-amd64
CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOARCH=arm64 go/bin/go build ./cmd/geth -o geth-arm64
go/bin/go build -o geth-amd64 ./cmd/geth
CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOARCH=arm64 go/bin/go build -o geth-arm64 ./cmd/geth
# - run:
# name: build image
# command: |
Expand Down
4 changes: 2 additions & 2 deletions replica/kafka_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ func (consumer *KafkaEventConsumer) Start() {
}


func NewKafkaEventConsumerFromURLs(brokerURL, topic string, lastEmittedBlock common.Hash, offsets map[int32]int64, rollback int64, startingBlockNumber uint64) (EventConsumer, error) {
func NewKafkaEventConsumerFromURLs(brokerURL, topic string, lastEmittedBlock common.Hash, offsets map[int32]int64, rollback int64, startingBlockNumber uint64, finishedLimit int) (EventConsumer, error) {
brokers, config := cdc.ParseKafkaURL(brokerURL)
if err := cdc.CreateTopicIfDoesNotExist(brokerURL, topic, -1, nil); err != nil {
return nil, err
Expand Down Expand Up @@ -948,7 +948,7 @@ func NewKafkaEventConsumerFromURLs(brokerURL, topic string, lastEmittedBlock com
finished: make(map[common.Hash]bool),
oldFinished: make(map[common.Hash]bool),
skipped: make(map[common.Hash]bool),
finishedLimit: 128,
finishedLimit: finishedLimit,
lastEmittedBlock: lastEmittedBlock,
pendingEmits: make(map[common.Hash]map[common.Hash]struct{}),
pendingHashes: make(map[common.Hash]struct{}),
Expand Down