Skip to content

Commit 0b5077a

Browse files
authored
Merge pull request #745 from onflow/petera/fix-bootstrap-cadence-height
Fix bootstrapping to subscribe to correct start block
2 parents b23dc80 + b0b3a4c commit 0b5077a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bootstrap/bootstrap.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,17 @@ func (b *Bootstrap) StartEventIngestion(ctx context.Context) error {
141141

142142
chainID := b.config.FlowNetworkID
143143

144+
// the event subscriber takes the first block to sync from the Access node, which is the block
145+
// after the latest cadence block
146+
nextCadenceHeight := latestCadenceHeight + 1
147+
144148
// create event subscriber
145149
subscriber := ingestion.NewRPCEventSubscriber(
146150
b.logger,
147151
b.client,
148152
chainID,
149153
b.keystore,
150-
latestCadenceHeight,
154+
nextCadenceHeight,
151155
)
152156

153157
callTracerCollector, err := replayer.NewCallTracerCollector(b.logger)

0 commit comments

Comments
 (0)