Fix persistHeader not returning proper header ID
This commit is contained in:
parent
587d2219d8
commit
3cb8fe60d4
@ -49,6 +49,7 @@ func persistHeader(db *postgres.DB, blockNumber int64, blockChain core.BlockChai
|
|||||||
return core.Header{}, err
|
return core.Header{}, err
|
||||||
}
|
}
|
||||||
headerRepository := repositories.NewHeaderRepository(db)
|
headerRepository := repositories.NewHeaderRepository(db)
|
||||||
_, err = headerRepository.CreateOrUpdateHeader(header)
|
id, err := headerRepository.CreateOrUpdateHeader(header)
|
||||||
|
header.Id = id
|
||||||
return header, err
|
return header, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user