[NOD-283] Fixed a crash in notifyChainChanged. (#372)

This commit is contained in:
stasatdaglabs 2019-08-22 13:23:30 +03:00 committed by Svarog
parent 1a569c7bd7
commit 36d5ac189f

View File

@ -559,7 +559,7 @@ func (m *wsNotificationManager) notifyChainChanged(clients map[chan struct{}]*ws
removedChainBlockHashes []*daghash.Hash, addedChainBlockHashes []*daghash.Hash) {
// Collect removed chain hashes.
removedChainHashes := make([]daghash.Hash, 0, len(removedChainBlockHashes))
removedChainHashes := make([]daghash.Hash, len(removedChainBlockHashes))
for i, hash := range removedChainBlockHashes {
removedChainHashes[i] = *hash
}