mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-20 13:34:32 +01:00
tlv/bench_test: fix ESatPerKw, pass reference to uint64
This commit is contained in:
parent
7cd78afd1a
commit
ffddb85e9c
1 changed files with 2 additions and 1 deletions
|
@ -50,7 +50,8 @@ func DBlobType(r io.Reader, val interface{}, buf *[8]byte, l uint64) error {
|
|||
// ESatPerKW is an encoder for lnwallet.SatPerKWeight.
|
||||
func ESatPerKW(w io.Writer, val interface{}, buf *[8]byte) error {
|
||||
if v, ok := val.(*chainfee.SatPerKWeight); ok {
|
||||
return tlv.EUint64(w, uint64(*v), buf)
|
||||
v64 := uint64(*v)
|
||||
return tlv.EUint64(w, &v64, buf)
|
||||
}
|
||||
return tlv.NewTypeForEncodingErr(val, "chainfee.SatPerKWeight")
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue