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:
16 files changed
+53
-55
No files matched your search
@@ -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),
|
||||
|
||||
|
||||
Reference in new issue
Block a user