multi: replace usage of fastsha256 with crypto/sha256

This commit removes all instances of the fastsha256 library and
replaces it with the sha256 library in the standard library. This
change should see a number of performance improvements as the standard
library has highly optimized assembly instructions with use vectorized
instructions as the platform supports.
This commit is contained in:
Olaoluwa Osuntokun committed 2017-03-15 18:56:41 -07:00
1 parent d723aada30
commit f217093c00
16 files changed
+53 -55

No files matched your search

+2 -1
View File
@@ -1,6 +1,7 @@
package main
import (
"crypto/sha256"
"encoding/hex"
"errors"
"fmt"
@@ -124,7 +125,7 @@ func newServer(listenAddrs []string, notifier chainntnfs.ChainNotifier,
// TODO(roasbeef): derive proper onion key based on rotation
// schedule
sphinx: sphinx.NewRouter(privKey, activeNetParams.Params),
lightningID: fastsha256.Sum256(serializedPubKey),
lightningID: sha256.Sum256(serializedPubKey),
persistentConnReqs: make(map[string]*connmgr.ConnReq),