From e27a6df689e26e7f5cc25e0713b18f2dd35a7998 Mon Sep 17 00:00:00 2001 From: Ian Norden Date: Tue, 11 May 2021 22:06:18 -0500 Subject: [PATCH] fix --- core/types/receipt.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/types/receipt.go b/core/types/receipt.go index ec8f34d665201..590f457415497 100644 --- a/core/types/receipt.go +++ b/core/types/receipt.go @@ -162,10 +162,8 @@ func (r *Receipt) MarshalBinary() ([]byte, error) { return rlp.EncodeToBytes(r) } data := &receiptRLP{r.statusEncoding(), r.CumulativeGasUsed, r.Bloom, r.Logs} - buf := encodeBufferPool.Get().(*bytes.Buffer) - defer encodeBufferPool.Put(buf) - buf.Reset() - err := r.encodeTyped(data, buf) + var buf bytes.Buffer + err := r.encodeTyped(data, &buf) return buf.Bytes(), err }