From 95b7a377900124daaba5ac5cca2b7bab7c4b05c0 Mon Sep 17 00:00:00 2001 From: Bartek Nowotarski Date: Thu, 23 Nov 2017 15:26:40 +0100 Subject: [PATCH] Fix ingestSignerEffects --- src/github.com/stellar/horizon/ingest/main.go | 2 +- src/github.com/stellar/horizon/ingest/session.go | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/github.com/stellar/horizon/ingest/main.go b/src/github.com/stellar/horizon/ingest/main.go index ca4d7422..1047f065 100644 --- a/src/github.com/stellar/horizon/ingest/main.go +++ b/src/github.com/stellar/horizon/ingest/main.go @@ -21,7 +21,7 @@ const ( // Scripts, that have yet to be ported to this codebase can then be leveraged // to re-ingest old data with the new algorithm, providing a seamless // transition when the ingested data's structure changes. - CurrentVersion = 9 + CurrentVersion = 11 ) // Cursor iterates through a stellar core database's ledgers diff --git a/src/github.com/stellar/horizon/ingest/session.go b/src/github.com/stellar/horizon/ingest/session.go index 5e15b764..0ba4c40e 100644 --- a/src/github.com/stellar/horizon/ingest/session.go +++ b/src/github.com/stellar/horizon/ingest/session.go @@ -390,6 +390,13 @@ func (is *Session) ingestSignerEffects(effects *EffectIngestion, op xdr.SetOptio return } + // Quickfix for: + // > invalid memory address or nil pointer dereference + // near `beforeAccount := be.Data.MustAccount()` + if be == nil || ae == nil { + return + } + beforeAccount := be.Data.MustAccount() afterAccount := ae.Data.MustAccount()