proxyd: Add nonce to sender-based rate limit

This commit is contained in:
Matthew Slipper 2023-01-27 12:36:20 -07:00
parent f66cedbef5
commit d7c80a5a8c

@ -631,7 +631,7 @@ func (s *Server) rateLimitSender(ctx context.Context, req *RPCReq) error {
return ErrInvalidParams(err.Error())
}
ok, err := s.senderLim.Take(ctx, msg.From().Hex())
ok, err := s.senderLim.Take(ctx, fmt.Sprintf("%s:%d", msg.From().Hex(), tx.Nonce()))
if err != nil {
log.Error("error taking from sender limiter", "err", err, "req_id", GetReqID(ctx))
return ErrInternal