Skip to content

Commit 77bce51

Browse files
author
Naohiro Yoshida
committed
check type
1 parent 38284e6 commit 77bce51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

module/prover.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ func (pr *Prover) buildInitialState(dstHeader core.Header) (exported.ClientState
241241
// Last ForkSpec must have height or CreateClient is less than fork spec timestamp
242242
forkSpecs := pr.getForkParameters()
243243
lastForkSpec := forkSpecs[len(forkSpecs)-1]
244-
lastForkSpecTime := lastForkSpec.GetHeightOrTimestamp().(*ForkSpec_Timestamp)
245-
if lastForkSpecTime != nil {
244+
lastForkSpecTime, ok := lastForkSpec.GetHeightOrTimestamp().(*ForkSpec_Timestamp)
245+
if ok && lastForkSpecTime != nil {
246246
target, err := dstHeader.(*Header).Target()
247247
if err != nil {
248248
return nil, nil, err

0 commit comments

Comments
 (0)