From ffddb85e9c75ce41f165fc3d6b79ac760ff06411 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Thu, 4 Mar 2021 10:01:14 -0800 Subject: [PATCH] tlv/bench_test: fix ESatPerKw, pass reference to uint64 --- tlv/bench_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tlv/bench_test.go b/tlv/bench_test.go index 6233c62a..132032b0 100644 --- a/tlv/bench_test.go +++ b/tlv/bench_test.go @@ -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") }