Commit 5a274054 authored by protolambda's avatar protolambda

p2p: use regular bytes buffer

parent c4f8e11e
......@@ -20,7 +20,6 @@ require (
github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c
github.com/ipfs/go-datastore v0.6.0
github.com/ipfs/go-ds-leveldb v0.5.0
github.com/libp2p/go-buffer-pool v0.1.0
github.com/libp2p/go-libp2p v0.25.1
github.com/libp2p/go-libp2p-pubsub v0.9.0
github.com/libp2p/go-libp2p-testing v0.12.0
......@@ -106,6 +105,7 @@ require (
github.com/koron/go-ssdp v0.0.3 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/libp2p/go-cidranger v1.1.0 // indirect
github.com/libp2p/go-flow-metrics v0.1.0 // indirect
github.com/libp2p/go-libp2p-asn-util v0.2.0 // indirect
......
......@@ -3,12 +3,10 @@ package store
import (
"bytes"
"encoding/binary"
pool "github.com/libp2p/go-buffer-pool"
)
func serializeScoresV0(scores PeerScores) ([]byte, error) {
var b pool.Buffer
var b bytes.Buffer
err := binary.Write(&b, binary.BigEndian, scores.Gossip)
if err != nil {
return nil, err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment