File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -635,6 +635,11 @@ func (c *Client) handleRollForward(msgGeneric protocol.Message) error {
635
635
}
636
636
}
637
637
if firstBlockChan != nil {
638
+ if blockHeader == nil {
639
+ err := fmt .Errorf ("missing block header" )
640
+ firstBlockChan <- clientPointResult {error : err }
641
+ return err
642
+ }
638
643
blockHash , err := hex .DecodeString (blockHeader .Hash ())
639
644
if err != nil {
640
645
firstBlockChan <- clientPointResult {error : err }
@@ -677,6 +682,11 @@ func (c *Client) handleRollForward(msgGeneric protocol.Message) error {
677
682
}
678
683
}
679
684
if firstBlockChan != nil {
685
+ if block == nil {
686
+ err := fmt .Errorf ("missing block" )
687
+ firstBlockChan <- clientPointResult {error : err }
688
+ return err
689
+ }
680
690
blockHash , err := hex .DecodeString (block .Hash ())
681
691
if err != nil {
682
692
firstBlockChan <- clientPointResult {error : err }
You can’t perform that action at this time.
0 commit comments