From 3cb8fe60d41c9fb70f1493d4906ec41dd02eca41 Mon Sep 17 00:00:00 2001 From: Edvard Date: Mon, 10 Dec 2018 16:58:24 +0100 Subject: [PATCH] Fix persistHeader not returning proper header ID --- pkg/transformers/integration_tests/helpers.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/transformers/integration_tests/helpers.go b/pkg/transformers/integration_tests/helpers.go index e44b0cce..f6d00278 100644 --- a/pkg/transformers/integration_tests/helpers.go +++ b/pkg/transformers/integration_tests/helpers.go @@ -49,6 +49,7 @@ func persistHeader(db *postgres.DB, blockNumber int64, blockChain core.BlockChai return core.Header{}, err } headerRepository := repositories.NewHeaderRepository(db) - _, err = headerRepository.CreateOrUpdateHeader(header) + id, err := headerRepository.CreateOrUpdateHeader(header) + header.Id = id return header, err }