mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-11 05:20:05 +00:00
fix nil pointer in peer
This commit is contained in:
parent
b08532b278
commit
a6fe31e1f2
@ -31,7 +31,7 @@ func (s *Server) ImportTransactions(ctx context.Context, in *proto_txpool.Import
|
|||||||
|
|
||||||
func (s *Server) GetTransactions(ctx context.Context, in *proto_txpool.GetTransactionsRequest) (*proto_txpool.GetTransactionsReply, error) {
|
func (s *Server) GetTransactions(ctx context.Context, in *proto_txpool.GetTransactionsRequest) (*proto_txpool.GetTransactionsReply, error) {
|
||||||
buf := bytes.NewBuffer(nil)
|
buf := bytes.NewBuffer(nil)
|
||||||
reply := &proto_txpool.GetTransactionsReply{Txs: make([][]byte, 0, len(in.GetHashes()))}
|
reply := &proto_txpool.GetTransactionsReply{Txs: make([][]byte, len(in.Hashes))}
|
||||||
for i := range in.Hashes {
|
for i := range in.Hashes {
|
||||||
txn := s.txPool.Get(gointerfaces.ConvertH256ToHash(in.Hashes[i]))
|
txn := s.txPool.Get(gointerfaces.ConvertH256ToHash(in.Hashes[i]))
|
||||||
if txn == nil {
|
if txn == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user