Skip to content

Commit

Permalink
fixup! put difflayer into verifyManage cache when node restart
Browse files Browse the repository at this point in the history
  • Loading branch information
j75689 committed Apr 13, 2022
1 parent 34e8ce0 commit 5675916
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/remote_state_verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,14 @@ func NewVerifyManager(blockchain *BlockChain, peers verifyPeers, allowInsecure b
if oldBlock == nil {
return nil, fmt.Errorf("block is nil, number: %d", number)
}
_, err := blockchain.GenerateDiffLayer(oldBlock.Hash())
blockHash := oldBlock.Hash()
_, err := blockchain.GenerateDiffLayer(blockHash)
if err != nil {
return nil, err
}
diffLayerCh := make(chan struct{})
close(diffLayerCh)
blockchain.diffLayerChanCache.Add(blockHash, diffLayerCh)
}

vm := &remoteVerifyManager{
Expand Down

0 comments on commit 5675916

Please sign in to comment.