From 198130fdd2267b02a6a0771df5bd5136240267f5 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 92e91acf3ba74..1661df0dad77c 100644 --- a/core/types/receipt.go +++ b/core/types/receipt.go @@ -141,10 +141,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 }