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
+2
-2
@@ -1,12 +1,12 @@
|
||||
package lnwallet
|
||||
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"fmt"
|
||||
"net"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/btcsuite/fastsha256"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/lightningnetwork/lnd/chainntnfs"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
@@ -1287,7 +1287,7 @@ func deriveStateHintObfuscator(producer shachain.Producer) ([StateHintSize]byte,
|
||||
return obfuscator, err
|
||||
}
|
||||
|
||||
grandChild := fastsha256.Sum256(firstChild[:])
|
||||
grandChild := sha256.Sum256(firstChild[:])
|
||||
copy(obfuscator[:], grandChild[:])
|
||||
|
||||
return obfuscator, nil
|
||||
|
||||
Reference in new issue
Block a user