Skip to content

Commit

Permalink
bugfix: Moved the Print of Compute inside exists so that, we dont crash
Browse files Browse the repository at this point in the history
gameofpointers committed Oct 30, 2023
1 parent b3e3586 commit 9578c84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/slice.go
Original file line number Diff line number Diff line change
@@ -831,10 +831,10 @@ func (sl *Slice) computePendingHeader(localPendingHeaderWithTermini types.Pendin
var cachedPendingHeaderWithTermini types.PendingHeader
hash := localPendingHeaderWithTermini.Termini().DomTerminus()
cachedPendingHeaderWithTermini, exists := sl.readPhCache(hash)
log.Debug("computePendingHeader:", "hash:", hash, "pendingHeader:", cachedPendingHeaderWithTermini, "termini:", cachedPendingHeaderWithTermini.Termini)
var newPh *types.Header

if exists {
log.Debug("computePendingHeader:", "hash:", hash, "pendingHeader:", cachedPendingHeaderWithTermini, "termini:", cachedPendingHeaderWithTermini.Termini())
if domOrigin {
newPh = sl.combinePendingHeader(localPendingHeaderWithTermini.Header(), domPendingHeader, nodeCtx, true)
return types.NewPendingHeader(types.CopyHeader(newPh), localPendingHeaderWithTermini.Termini())

0 comments on commit 9578c84

Please sign in to comment.