good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit c56d3268 authored by Alex Sharov's avatar Alex Sharov Committed by GitHub
Browse files

fix_nil_pointer (#3871)

parent b329d675
No related branches found
No related tags found
No related merge requests found
......@@ -102,10 +102,6 @@ func SpawnStageHeaders(
initialCycle bool,
test bool, // Set to true in tests, allows the stage to fail rather than wait indefinitely
) error {
if err := DownloadAndIndexSnapshotsIfNeed(s, ctx, tx, cfg, initialCycle); err != nil {
return err
}
useExternalTx := tx != nil
if !useExternalTx {
var err error
......@@ -115,8 +111,11 @@ func SpawnStageHeaders(
}
defer tx.Rollback()
}
var blockNumber uint64
if err := DownloadAndIndexSnapshotsIfNeed(s, ctx, tx, cfg, initialCycle); err != nil {
return err
}
var blockNumber uint64
if s == nil {
blockNumber = 0
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment