mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-04 18:52:44 +02:00
channeldb+htlcswitch: don't use fastsha256 in tests
The btcsuite/fastsha256 registers itself in the crypto package of golang as a replacement for sha256. This causes problems in TLS1.3 connections that require the hash implementations to be serializable and results in the "tls: internal error: failed to clone hash" error. By removing all uses of the library we fix that error.
This commit is contained in:
@@ -20,7 +20,6 @@ import (
|
||||
"github.com/btcsuite/btcd/chaincfg/chainhash"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/btcsuite/fastsha256"
|
||||
"github.com/go-errors/errors"
|
||||
sphinx "github.com/lightningnetwork/lightning-onion"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
@@ -598,7 +597,7 @@ func generatePayment(invoiceAmt, htlcAmt lnwire.MilliSatoshi, timelock uint32,
|
||||
}
|
||||
copy(preimage[:], r)
|
||||
|
||||
rhash := fastsha256.Sum256(preimage[:])
|
||||
rhash := sha256.Sum256(preimage[:])
|
||||
return generatePaymentWithPreimage(
|
||||
invoiceAmt, htlcAmt, timelock, blob, preimage, rhash,
|
||||
)
|
||||
|
Reference in New Issue
Block a user