Skip to content

Commit da442c9

Browse files
committed
fix
1 parent 736fab2 commit da442c9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

core/types/receipt.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,8 @@ func (r *Receipt) MarshalBinary() ([]byte, error) {
141141
return rlp.EncodeToBytes(r)
142142
}
143143
data := &receiptRLP{r.statusEncoding(), r.CumulativeGasUsed, r.Bloom, r.Logs}
144-
buf := encodeBufferPool.Get().(*bytes.Buffer)
145-
defer encodeBufferPool.Put(buf)
146-
buf.Reset()
147-
err := r.encodeTyped(data, buf)
144+
var buf bytes.Buffer
145+
err := r.encodeTyped(data, &buf)
148146
return buf.Bytes(), err
149147
}
150148

0 commit comments

Comments
 (0)